home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1991-10-22 | 38.9 KB | [TEXT/????] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: main.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
10%
| dexvert
| Jesper Olsen Module (music/jesperOlsen)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Tue Oct 22 16:10:28 1991, modified Tue Oct 22 16:10:28 1991, creator '????', type ASCII, 39093 bytes "main.c" , at 0x9935 436 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
49%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
33%
| TrID
| TTComp archive compressed (bin-4K)
| default (weak)
| |
16%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [????] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 6d 61 69 6e 2e 63 | 00 00 00 00 00 00 00 00 |..main.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 3f 3f 3f | 3f 00 00 00 00 00 00 00 |.TEXT???|?.......|
|00000050| 00 00 00 00 00 98 b5 00 | 00 01 b4 a5 2a 36 34 a5 |........|....*64.|
|00000060| 2a 36 34 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |*64.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7b 47 00 00 |........|....{G..|
|00000080| 2f 2a 0d 09 43 6f 70 79 | 72 69 67 68 74 20 43 6f |/*..Copy|right Co|
|00000090| 72 6e 65 6c 6c 20 55 6e | 69 76 65 72 73 69 74 79 |rnell Un|iversity|
|000000a0| 20 31 39 38 36 2e 20 20 | 41 6c 6c 20 72 69 67 68 | 1986. |All righ|
|000000b0| 74 73 20 61 72 65 20 72 | 65 73 65 72 76 65 64 2e |ts are r|eserved.|
|000000c0| 0d 2a 2f 0d 0d 0d 2f 2a | 2a 2a 2a 2a 2a 2a 2a 2a |.*/.../*|********|
|000000d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000100| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000110| 2a 2a 0d 2a 2a 20 20 20 | 20 20 33 32 37 30 20 44 |**.** | 3270 D|
|00000120| 72 69 76 65 72 20 20 69 | 6e 69 74 69 61 6c 69 7a |river i|nitializ|
|00000130| 61 74 69 6f 6e 73 2c 20 | 6d 61 69 6e 20 70 72 6f |ations, |main pro|
|00000140| 67 72 61 6d 2c 20 26 20 | 65 72 72 6f 72 20 68 61 |gram, & |error ha|
|00000150| 6e 64 6c 65 72 20 20 20 | 20 20 20 20 20 2a 2a 0d |ndler | **.|
|00000160| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 0d 2a 2a 20 |********|****.** |
|000001b0| 20 20 20 20 44 65 76 65 | 6c 6f 70 65 64 20 61 74 | Deve|loped at|
|000001c0| 20 43 6f 72 6e 65 6c 6c | 20 55 6e 69 76 65 72 73 | Cornell| Univers|
|000001d0| 69 74 79 20 62 79 3a 09 | 09 09 09 09 09 09 09 20 |ity by:.|....... |
|000001e0| 20 2a 2a 0d 2a 2a 20 20 | 20 20 20 52 69 63 68 61 | **.** | Richa|
|000001f0| 72 64 20 43 6f 67 67 65 | 72 2c 20 50 65 74 65 72 |rd Cogge|r, Peter|
|00000200| 20 48 6f 79 74 2c 20 4b | 65 76 69 6e 20 53 61 75 | Hoyt, K|evin Sau|
|00000210| 6e 64 65 72 73 2c 20 26 | 20 4a 6f 68 6e 20 4c 79 |nders, &| John Ly|
|00000220| 6e 6e 09 09 20 20 20 20 | 20 20 2a 2a 0d 2a 2a 20 |nn.. | **.** |
|00000230| 20 20 20 20 69 6e 63 6c | 75 64 65 73 20 63 61 6c | incl|udes cal|
|00000240| 6c 73 20 74 6f 20 54 43 | 50 2c 20 49 50 2c 20 61 |ls to TC|P, IP, a|
|00000250| 6e 64 20 74 61 73 6b 69 | 6e 67 20 72 6f 75 74 69 |nd taski|ng routi|
|00000260| 6e 65 73 20 64 65 76 65 | 6c 6f 70 65 64 20 61 74 |nes deve|loped at|
|00000270| 20 4d 49 54 20 20 20 2a | 2a 0d 2a 2a 2a 2a 2a 2a | MIT *|*.******|
|00000280| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000290| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002c0| 2a 2a 2a 2a 2a 2f 0d 0d | 2f 2a 20 74 6e 33 32 37 |*****/..|/* tn327|
|000002d0| 30 2e 63 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |0.c cont|ains the|
|000002e0| 20 6d 61 69 6e 28 29 20 | 6c 6f 6f 70 20 61 6e 64 | main() |loop and|
|000002f0| 20 76 61 72 69 6f 75 73 | 20 73 75 70 70 6f 72 74 | various| support|
|00000300| 20 72 6f 75 74 69 6e 65 | 73 20 2a 2f 0d 0d 23 69 | routine|s */..#i|
|00000310| 66 64 65 66 20 4d 55 4c | 54 49 0d 09 09 09 2f 2a |fdef MUL|TI..../*|
|00000320| 20 6d 75 6c 74 69 70 6c | 65 20 77 69 6e 64 6f 77 | multipl|e window|
|00000330| 73 20 76 65 72 73 69 6f | 6e 20 2a 2f 0d 09 09 09 |s versio|n */....|
|00000340| 0d 23 69 6e 63 6c 75 64 | 65 09 3c 65 6d 2e 68 3e |.#includ|e.<em.h>|
|00000350| 0d 0d 23 69 6e 63 6c 75 | 64 65 09 3c 63 6e 74 6c |..#inclu|de.<cntl|
|00000360| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 09 3c 6b 65 |.h>.#inc|lude.<ke|
|00000370| 79 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 09 3c 6d |y.h>.#in|clude.<m|
|00000380| 61 63 64 65 66 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |acdefs.h|>.#inclu|
|00000390| 64 65 09 3c 68 31 39 2e | 68 3e 0d 23 69 6e 63 6c |de.<h19.|h>.#incl|
|000003a0| 75 64 65 09 3c 74 69 6d | 65 72 2e 68 3e 0d 23 69 |ude.<tim|er.h>.#i|
|000003b0| 6e 63 6c 75 64 65 09 3c | 66 74 2e 68 3e 0d 0d 23 |nclude.<|ft.h>..#|
|000003c0| 69 6e 63 6c 75 64 65 09 | 3c 33 32 37 30 2e 68 3e |include.|<3270.h>|
|000003d0| 20 20 20 09 09 09 09 09 | 2f 2a 20 65 78 74 65 72 | .....|/* exter|
|000003e0| 6e 61 6c 20 76 61 72 69 | 61 62 6c 65 73 20 26 20 |nal vari|ables & |
|000003f0| 63 6f 6e 73 74 61 6e 74 | 73 20 09 2a 2f 0d 23 69 |constant|s .*/.#i|
|00000400| 6e 63 6c 75 64 65 09 3c | 63 6e 74 6c 64 65 66 73 |nclude.<|cntldefs|
|00000410| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 09 3c 72 65 |.h>.#inc|lude.<re|
|00000420| 73 64 65 66 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |sdefs.h>|.#includ|
|00000430| 65 09 22 78 6c 61 74 65 | 2e 68 22 0d 23 69 6e 63 |e."xlate|.h".#inc|
|00000440| 6c 75 64 65 09 22 6d 65 | 6e 75 64 65 66 73 2e 68 |lude."me|nudefs.h|
|00000450| 22 0d 23 69 6e 63 6c 75 | 64 65 09 22 74 66 74 70 |".#inclu|de."tftp|
|00000460| 2e 68 22 0d 0d 23 69 66 | 64 65 66 20 44 55 41 4c |.h"..#if|def DUAL|
|00000470| 54 43 50 0d 0d 23 69 6e | 63 6c 75 64 65 09 3c 6e |TCP..#in|clude.<n|
|00000480| 65 74 2e 68 3e 09 09 2f | 2a 20 4e 45 57 20 6d 65 |et.h>../|* NEW me|
|00000490| 72 67 65 64 20 54 43 50 | 20 64 72 61 67 73 20 69 |rged TCP| drags i|
|000004a0| 6e 20 74 61 73 6b 2e 68 | 20 2a 2f 0d 23 65 6c 73 |n task.h| */.#els|
|000004b0| 65 0d 0d 23 69 6e 63 6c | 75 64 65 09 3c 6e 65 74 |e..#incl|ude.<net|
|000004c0| 2e 68 3e 09 09 2f 2a 20 | 4e 45 57 20 6d 65 72 67 |.h>../* |NEW merg|
|000004d0| 65 64 20 54 43 50 20 64 | 72 61 67 73 20 69 6e 20 |ed TCP d|rags in |
|000004e0| 74 61 73 6b 2e 68 20 2a | 2f 0d 23 69 6e 63 6c 75 |task.h *|/.#inclu|
|000004f0| 64 65 09 3c 71 2e 68 3e | 09 09 2f 2a 20 54 4f 44 |de.<q.h>|../* TOD|
|00000500| 4f 20 73 68 6f 75 6c 64 | 20 62 65 20 64 69 66 66 |O should| be diff|
|00000510| 65 72 65 6e 74 20 77 69 | 74 68 20 4d 41 43 54 43 |erent wi|th MACTC|
|00000520| 50 20 61 6c 6f 6e 65 20 | 2a 2f 0d 65 78 74 65 72 |P alone |*/.exter|
|00000530| 6e 20 63 68 61 72 20 74 | 69 6d 65 72 74 72 69 70 |n char t|imertrip|
|00000540| 70 65 64 3b 09 09 2f 2a | 20 74 68 65 20 74 69 6d |ped;../*| the tim|
|00000550| 65 72 20 72 65 71 75 69 | 72 65 73 20 73 65 72 76 |er requi|res serv|
|00000560| 69 63 65 20 2a 2f 0d 23 | 65 6e 64 69 66 0d 0d 23 |ice */.#|endif..#|
|00000570| 65 6c 73 65 0d 0d 23 69 | 66 64 65 66 20 4d 41 43 |else..#i|fdef MAC|
|00000580| 54 43 50 0d 23 69 6e 63 | 6c 75 64 65 09 3c 71 2e |TCP.#inc|lude.<q.|
|00000590| 68 3e 0d 23 65 6c 73 65 | 0d 23 69 6e 63 6c 75 64 |h>.#else|.#includ|
|000005a0| 65 09 3c 74 63 70 2e 68 | 3e 0d 0d 23 65 6e 64 69 |e.<tcp.h|>..#endi|
|000005b0| 66 0d 0d 23 69 6e 63 6c | 75 64 65 09 3c 73 74 64 |f..#incl|ude.<std|
|000005c0| 69 6f 2e 68 3e 0d 0d 23 | 69 6e 63 6c 75 64 65 09 |io.h>..#|include.|
|000005d0| 3c 6f 73 75 74 69 6c 2e | 68 3e 0d 23 69 6e 63 6c |<osutil.|h>.#incl|
|000005e0| 75 64 65 09 3c 71 75 69 | 63 6b 64 72 61 77 2e 68 |ude.<qui|ckdraw.h|
|000005f0| 3e 20 0d 23 69 6e 63 6c | 75 64 65 09 3c 72 65 73 |> .#incl|ude.<res|
|00000600| 6f 75 72 63 65 2e 68 3e | 20 0d 23 69 6e 63 6c 75 |ource.h>| .#inclu|
|00000610| 64 65 09 3c 74 6f 6f 6c | 75 74 69 6c 2e 68 3e 0d |de.<tool|util.h>.|
|00000620| 23 69 6e 63 6c 75 64 65 | 09 3c 77 69 6e 64 6f 77 |#include|.<window|
|00000630| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 09 3c 63 6f |.h>.#inc|lude.<co|
|00000640| 6e 74 72 6f 6c 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |ntrol.h>|.#includ|
|00000650| 65 09 3c 66 6f 6e 74 2e | 68 3e 20 0d 23 69 6e 63 |e.<font.|h> .#inc|
|00000660| 6c 75 64 65 09 3c 65 76 | 65 6e 74 2e 68 3e 0d 23 |lude.<ev|ent.h>.#|
|00000670| 69 6e 63 6c 75 64 65 09 | 3c 64 65 73 6b 2e 68 3e |include.|<desk.h>|
|00000680| 0d 23 69 6e 63 6c 75 64 | 65 09 3c 70 61 63 6b 61 |.#includ|e.<packa|
|00000690| 67 65 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 09 |ges.h>.#|include.|
|000006a0| 3c 73 65 67 6d 65 6e 74 | 2e 68 3e 0d 0d 23 69 6e |<segment|.h>..#in|
|000006b0| 63 6c 75 64 65 09 3c 6d | 65 6e 75 2e 68 3e 0d 23 |clude.<m|enu.h>.#|
|000006c0| 69 6e 63 6c 75 64 65 09 | 3c 64 69 61 6c 6f 67 2e |include.|<dialog.|
|000006d0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 09 3c 6d 65 6d |h>.#incl|ude.<mem|
|000006e0| 6f 72 79 2e 68 3e 0d 0d | 23 69 6e 63 6c 75 64 65 |ory.h>..|#include|
|000006f0| 09 3c 63 6e 74 6c 2e 68 | 3e 0d 23 69 6e 63 6c 75 |.<cntl.h|>.#inclu|
|00000700| 64 65 09 3c 6b 65 79 2e | 68 3e 0d 23 69 6e 63 6c |de.<key.|h>.#incl|
|00000710| 75 64 65 09 3c 6d 61 63 | 64 65 66 73 2e 68 3e 0d |ude.<mac|defs.h>.|
|00000720| 23 69 6e 63 6c 75 64 65 | 09 3c 68 31 39 2e 68 3e |#include|.<h19.h>|
|00000730| 0d 23 69 6e 63 6c 75 64 | 65 09 3c 74 69 6d 65 72 |.#includ|e.<timer|
|00000740| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 09 3c 65 6d |.h>.#inc|lude.<em|
|00000750| 64 65 66 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |defs.h>.|#include|
|00000760| 09 3c 74 65 6c 6e 65 74 | 2e 68 3e 0d 23 69 6e 63 |.<telnet|.h>.#inc|
|00000770| 6c 75 64 65 09 3c 66 74 | 2e 68 3e 0d 0d 23 69 6e |lude.<ft|.h>..#in|
|00000780| 63 6c 75 64 65 09 3c 33 | 32 37 30 2e 68 3e 20 20 |clude.<3|270.h> |
|00000790| 20 09 09 09 09 09 2f 2a | 20 65 78 74 65 72 6e 61 | ...../*| externa|
|000007a0| 6c 20 76 61 72 69 61 62 | 6c 65 73 20 26 20 63 6f |l variab|les & co|
|000007b0| 6e 73 74 61 6e 74 73 20 | 09 2a 2f 0d 23 69 6e 63 |nstants |.*/.#inc|
|000007c0| 6c 75 64 65 09 3c 63 6e | 74 6c 64 65 66 73 2e 68 |lude.<cn|tldefs.h|
|000007d0| 3e 0d 23 69 6e 63 6c 75 | 64 65 09 3c 72 65 73 64 |>.#inclu|de.<resd|
|000007e0| 65 66 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 09 |efs.h>.#|include.|
|000007f0| 22 78 6c 61 74 65 2e 68 | 22 0d 23 69 6e 63 6c 75 |"xlate.h|".#inclu|
|00000800| 64 65 09 22 6d 65 6e 75 | 64 65 66 73 2e 68 22 0d |de."menu|defs.h".|
|00000810| 23 69 6e 63 6c 75 64 65 | 09 22 74 66 74 70 2e 68 |#include|."tftp.h|
|00000820| 22 0d 0d 23 65 6e 64 69 | 66 0d 0d 0d 0d 23 69 66 |"..#endi|f....#if|
|00000830| 64 65 66 20 44 55 41 4c | 54 43 50 0d 23 75 6e 64 |def DUAL|TCP.#und|
|00000840| 65 66 20 4d 41 43 54 43 | 50 0d 2f 2a 20 6d 61 6b |ef MACTC|P./* mak|
|00000850| 65 20 62 6f 74 68 20 74 | 63 70 73 20 69 6e 20 6f |e both t|cps in o|
|00000860| 6e 65 20 70 61 63 6b 61 | 67 65 20 2a 2f 0d 23 65 |ne packa|ge */.#e|
|00000870| 6e 64 69 66 0d 0d 0d 73 | 74 72 75 63 74 20 77 69 |ndif...s|truct wi|
|00000880| 6e 64 73 20 2a 20 63 6f | 6e 6e 73 5b 4d 41 58 57 |nds * co|nns[MAXW|
|00000890| 49 4e 44 5d 3b 0d 73 68 | 6f 72 74 20 63 6f 6e 6e |IND];.sh|ort conn|
|000008a0| 63 6f 75 6e 74 3b 0d 0d | 2f 2a 20 74 72 75 65 20 |count;..|/* true |
|000008b0| 67 6c 6f 62 61 6c 73 20 | 2a 2f 0d 0d 23 69 66 64 |globals |*/..#ifd|
|000008c0| 65 66 20 4d 55 4c 54 49 | 0d 73 74 72 75 63 74 20 |ef MULTI|.struct |
|000008d0| 77 69 6e 64 73 20 2a 20 | 65 6d 64 70 3b 09 09 09 |winds * |emdp;...|
|000008e0| 2f 2a 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 63 6f |/* point|er to co|
|000008f0| 6e 6e 65 63 74 69 6f 6e | 20 62 6c 6f 63 6b 20 77 |nnection| block w|
|00000900| 65 27 72 65 20 75 73 69 | 6e 67 20 2a 2f 0d 73 74 |e're usi|ng */.st|
|00000910| 72 75 63 74 20 77 69 6e | 64 73 20 2a 20 6b 65 79 |ruct win|ds * key|
|00000920| 64 70 3b 09 09 09 2f 2a | 20 70 6f 69 6e 74 65 72 |dp;.../*| pointer|
|00000930| 20 74 6f 20 74 6f 70 20 | 77 69 6e 64 6f 77 20 63 | to top |window c|
|00000940| 6f 6e 6e 65 63 74 69 6f | 6e 20 62 6c 6f 63 6b 20 |onnectio|n block |
|00000950| 77 65 27 72 65 20 75 73 | 69 6e 67 20 2a 2f 0d 23 |we're us|ing */.#|
|00000960| 65 6e 64 69 66 0d 0d 73 | 68 6f 72 74 20 6d 66 62 |endif..s|hort mfb|
|00000970| 61 63 6b 6f 6e 6c 79 3b | 09 09 09 09 2f 2a 20 72 |ackonly;|..../* r|
|00000980| 75 6e 20 77 68 6f 6c 65 | 20 61 70 70 20 6f 6e 6c |un whole| app onl|
|00000990| 79 20 69 6e 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |y in bac|kground |
|000009a0| 2a 2f 0d 0d 57 69 6e 64 | 6f 77 50 74 72 09 6b 65 |*/..Wind|owPtr.ke|
|000009b0| 79 77 69 6e 64 6f 77 3b | 09 09 09 2f 2a 20 74 68 |ywindow;|.../* th|
|000009c0| 65 20 61 63 74 69 76 65 | 20 77 69 6e 64 6f 77 2c |e active| window,|
|000009d0| 20 65 6d 77 69 6e 64 6f | 77 20 6f 72 20 74 65 78 | emwindo|w or tex|
|000009e0| 74 77 69 6e 64 6f 77 20 | 2a 2f 20 0d 57 69 6e 64 |twindow |*/ .Wind|
|000009f0| 6f 77 50 74 72 09 69 63 | 6f 6e 77 69 6e 64 6f 77 |owPtr.ic|onwindow|
|00000a00| 3b 09 09 09 2f 2a 20 74 | 6f 70 20 67 6f 2d 61 77 |;.../* t|op go-aw|
|00000a10| 61 79 20 77 69 6e 64 6f | 77 2c 20 73 68 6f 77 73 |ay windo|w, shows|
|00000a20| 20 74 6e 33 32 37 30 20 | 69 63 6f 6e 20 2a 2f 0d | tn3270 |icon */.|
|00000a30| 57 69 6e 64 6f 77 50 74 | 72 09 65 6d 77 69 6e 64 |WindowPt|r.emwind|
|00000a40| 6f 77 3b 09 09 09 2f 2a | 20 74 68 65 20 63 75 72 |ow;.../*| the cur|
|00000a50| 72 65 6e 74 20 6f 75 74 | 70 75 74 20 65 6d 75 6c |rent out|put emul|
|00000a60| 61 74 6f 72 20 77 69 6e | 64 6f 77 20 2a 2f 20 0d |ator win|dow */ .|
|00000a70| 0d 23 69 66 64 65 66 20 | 55 53 45 48 45 4c 50 57 |.#ifdef |USEHELPW|
|00000a80| 49 4e 44 4f 57 0d 2f 2a | 20 68 65 6c 70 20 77 69 |INDOW./*| help wi|
|00000a90| 6e 64 6f 77 20 76 61 72 | 73 20 2a 2f 0d 57 69 6e |ndow var|s */.Win|
|00000aa0| 64 6f 77 50 74 72 09 68 | 65 6c 70 77 69 6e 64 6f |dowPtr.h|elpwindo|
|00000ab0| 77 3b 09 09 09 2f 2a 20 | 74 68 65 72 65 20 69 73 |w;.../* |there is|
|00000ac0| 20 6f 6e 65 20 68 65 6c | 70 20 77 69 6e 64 6f 77 | one hel|p window|
|00000ad0| 20 2a 2f 20 0d 73 74 72 | 75 63 74 20 77 69 6e 64 | */ .str|uct wind|
|00000ae0| 74 65 78 74 20 68 65 6c | 70 74 65 78 74 3b 0d 73 |text hel|ptext;.s|
|00000af0| 74 72 75 63 74 20 77 69 | 6e 64 74 65 78 74 20 7b |truct wi|ndtext {|
|00000b00| 0d 09 54 45 48 61 6e 64 | 6c 65 09 74 65 78 74 68 |..TEHand|le.texth|
|00000b10| 61 6e 64 3b 09 09 09 09 | 2f 2a 20 77 69 74 68 20 |and;....|/* with |
|00000b20| 61 20 54 65 78 74 45 64 | 69 74 20 62 6f 78 20 61 |a TextEd|it box a|
|00000b30| 6e 64 20 61 20 73 63 72 | 6f 6c 6c 62 61 72 20 2a |nd a scr|ollbar *|
|00000b40| 2f 20 0d 09 69 6e 74 09 | 09 09 46 69 72 73 74 4c |/ ..int.|..FirstL|
|00000b50| 69 6e 65 3b 09 09 09 09 | 2f 2a 20 74 68 65 20 6e |ine;....|/* the n|
|00000b60| 75 6d 62 65 72 20 6f 66 | 20 74 68 65 20 6c 69 6e |umber of| the lin|
|00000b70| 65 20 61 74 20 74 68 65 | 20 74 6f 70 20 2a 2f 0d |e at the| top */.|
|00000b80| 09 73 68 6f 72 74 20 09 | 09 74 65 78 74 73 63 72 |.short .|.textscr|
|00000b90| 61 70 70 65 64 3b 09 09 | 09 2f 2a 20 74 68 65 20 |apped;..|./* the |
|00000ba0| 54 45 20 73 63 72 61 70 | 20 68 61 73 20 62 65 65 |TE scrap| has bee|
|00000bb0| 6e 20 74 6f 75 63 68 65 | 64 20 61 6e 64 20 6d 75 |n touche|d and mu|
|00000bc0| 73 74 20 62 65 20 63 6f | 65 72 63 65 64 20 2a 2f |st be co|erced */|
|00000bd0| 0d 09 73 68 6f 72 74 20 | 09 09 74 65 78 74 6c 69 |..short |..textli|
|00000be0| 6e 65 73 3b 09 09 09 09 | 2f 2a 20 23 20 6f 66 20 |nes;....|/* # of |
|00000bf0| 6c 69 6e 65 73 20 69 6e | 20 70 61 67 65 20 2a 2f |lines in| page */|
|00000c00| 0d 09 43 6f 6e 74 72 6f | 6c 48 61 6e 64 6c 65 20 |..Contro|lHandle |
|00000c10| 73 63 72 6f 6c 6c 68 61 | 6e 64 3b 09 09 09 2f 2a |scrollha|nd;.../*|
|00000c20| 20 73 63 72 6f 6c 6c 20 | 62 61 72 20 63 6f 6e 74 | scroll |bar cont|
|00000c30| 72 6f 6c 20 2a 2f 0d 7d | 0d 23 65 6e 64 69 66 0d |rol */.}|.#endif.|
|00000c40| 0d 45 76 65 6e 74 52 65 | 63 6f 72 64 09 6d 79 45 |.EventRe|cord.myE|
|00000c50| 76 65 6e 74 3b 0d 0d 73 | 68 6f 72 74 20 63 6f 75 |vent;..s|hort cou|
|00000c60| 72 69 65 72 70 72 69 6e | 74 3b 09 09 09 09 09 2f |rierprin|t;...../|
|00000c70| 2a 20 70 72 69 6e 74 20 | 75 73 69 6e 67 20 43 6f |* print |using Co|
|00000c80| 75 72 69 65 72 20 6f 6e | 20 4c 61 73 65 72 57 72 |urier on| LaserWr|
|00000c90| 69 74 65 72 73 3f 20 2a | 2f 0d 73 68 6f 72 74 20 |iters? *|/.short |
|00000ca0| 61 70 70 72 65 73 66 69 | 64 3b 09 09 09 09 09 2f |appresfi|d;...../|
|00000cb0| 2a 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 72 65 |* applic|ation re|
|00000cc0| 73 6f 75 72 63 65 20 66 | 69 6c 65 20 64 65 73 63 |source f|ile desc|
|00000cd0| 72 69 70 74 6f 72 20 2a | 2f 0d 73 68 6f 72 74 20 |riptor *|/.short |
|00000ce0| 61 70 70 76 6f 6c 3b 09 | 09 09 09 09 09 2f 2a 20 |appvol;.|...../* |
|00000cf0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 68 6f 6d 65 |applicat|ion home|
|00000d00| 20 76 6f 6c 75 6d 65 20 | 2a 2f 0d 6c 6f 6e 67 20 | volume |*/.long |
|00000d10| 61 70 70 64 69 72 3b 09 | 09 09 09 09 09 2f 2a 20 |appdir;.|...../* |
|00000d20| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 68 6f 6d 65 |applicat|ion home|
|00000d30| 20 64 69 72 65 63 74 6f | 72 79 20 2a 2f 0d 73 68 | directo|ry */.sh|
|00000d40| 6f 72 74 20 61 70 70 76 | 72 65 66 3b 09 09 09 09 |ort appv|ref;....|
|00000d50| 09 09 2f 2a 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |../* app|lication|
|00000d60| 20 76 6f 6c 75 6d 65 20 | 72 65 66 20 6e 75 6d 20 | volume |ref num |
|00000d70| 2a 2f 0d 0d 63 68 61 72 | 20 2a 20 73 65 74 66 69 |*/..char| * setfi|
|00000d80| 6c 65 20 3d 20 22 5c 50 | 43 6f 6d 65 74 20 44 65 |le = "\P|Comet De|
|00000d90| 66 61 75 6c 74 22 3b 09 | 09 09 2f 2a 20 73 79 73 |fault";.|../* sys|
|00000da0| 74 65 6d 20 66 6f 6c 64 | 65 72 20 73 65 74 74 69 |tem fold|er setti|
|00000db0| 6e 67 73 20 64 65 66 61 | 75 6c 74 20 66 69 6c 65 |ngs defa|ult file|
|00000dc0| 6e 61 6d 65 20 2a 2f 0d | 0d 73 68 6f 72 74 20 71 |name */.|.short q|
|00000dd0| 75 69 74 6f 6e 63 6c 6f | 73 65 3b 09 09 09 09 09 |uitonclo|se;.....|
|00000de0| 2f 2a 20 75 73 65 72 20 | 77 61 6e 74 73 20 61 70 |/* user |wants ap|
|00000df0| 70 20 74 6f 20 63 6c 6f | 73 65 20 77 68 65 6e 20 |p to clo|se when |
|00000e00| 6e 6f 20 77 69 6e 64 6f | 77 73 20 2a 2f 0d 0d 2f |no windo|ws */../|
|00000e10| 2a 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 6d 61 6e |* connec|tion man|
|00000e20| 61 67 65 6d 65 6e 74 20 | 2a 2f 0d 73 68 6f 72 74 |agement |*/.short|
|00000e30| 20 63 6f 6e 6e 61 76 61 | 69 6c 61 62 6c 65 3b 09 | connava|ilable;.|
|00000e40| 09 09 2f 2a 20 61 6e 20 | 65 6d 70 74 79 20 63 6f |../* an |empty co|
|00000e50| 6e 6e 65 63 74 69 6f 6e | 20 73 74 72 75 63 74 20 |nnection| struct |
|00000e60| 69 73 20 6c 79 69 6e 67 | 20 61 62 6f 75 74 20 2a |is lying| about *|
|00000e70| 2f 0d 0d 2f 2a 20 54 43 | 50 20 76 61 72 73 20 2a |/../* TC|P vars *|
|00000e80| 2f 0d 73 68 6f 72 74 20 | 63 75 74 63 70 6f 70 65 |/.short |cutcpope|
|00000e90| 6e 3b 09 09 09 09 2f 2a | 20 43 6f 72 6e 65 6c 6c |n;..../*| Cornell|
|00000ea0| 20 54 43 50 20 68 61 73 | 20 62 65 65 6e 20 6f 70 | TCP has| been op|
|00000eb0| 65 6e 65 64 20 2a 2f 0d | 73 68 6f 72 74 20 6d 61 |ened */.|short ma|
|00000ec0| 63 69 70 6f 70 65 6e 3b | 09 09 09 09 2f 2a 20 6d |cipopen;|..../* m|
|00000ed0| 61 63 54 43 50 20 68 61 | 73 20 62 65 65 6e 20 6f |acTCP ha|s been o|
|00000ee0| 70 65 6e 65 64 20 2a 2f | 0d 73 68 6f 72 74 20 6d |pened */|.short m|
|00000ef0| 61 63 74 63 70 6f 70 65 | 6e 3b 09 09 09 09 2f 2a |actcpope|n;..../*|
|00000f00| 20 6d 61 63 54 43 50 20 | 68 61 73 20 62 65 65 6e | macTCP |has been|
|00000f10| 20 6f 70 65 6e 65 64 20 | 2a 2f 0d 73 68 6f 72 74 | opened |*/.short|
|00000f20| 20 6d 74 65 76 65 6e 74 | 3b 09 09 09 09 09 2f 2a | mtevent|;...../*|
|00000f30| 20 4d 61 63 54 43 50 2d | 2d 6e 65 77 20 64 61 74 | MacTCP-|-new dat|
|00000f40| 61 20 6f 72 20 63 6f 6e | 74 72 6f 6c 20 69 6e 66 |a or con|trol inf|
|00000f50| 6f 20 68 61 73 20 61 72 | 72 69 76 65 64 20 2a 2f |o has ar|rived */|
|00000f60| 0d 0d 73 68 6f 72 74 20 | 6d 74 63 70 73 65 6e 64 |..short |mtcpsend|
|00000f70| 61 73 79 6e 63 3b 09 09 | 09 2f 2a 20 75 73 65 20 |async;..|./* use |
|00000f80| 61 73 79 6e 63 20 73 65 | 6e 64 20 77 2f 20 4d 61 |async se|nd w/ Ma|
|00000f90| 63 54 43 50 20 2a 2f 0d | 0d 73 68 6f 72 74 20 74 |cTCP */.|.short t|
|00000fa0| 66 74 70 6f 70 65 6e 3b | 09 09 09 09 09 2f 2a 20 |ftpopen;|...../* |
|00000fb0| 68 61 73 20 74 66 74 70 | 20 62 65 65 6e 20 69 6e |has tftp| been in|
|00000fc0| 69 74 69 61 6c 69 7a 65 | 64 3f 20 2a 2f 0d 73 68 |itialize|d? */.sh|
|00000fd0| 6f 72 74 20 74 66 74 70 | 73 65 72 76 65 3b 09 09 |ort tftp|serve;..|
|00000fe0| 09 09 2f 2a 20 61 63 74 | 20 61 73 20 61 20 74 66 |../* act| as a tf|
|00000ff0| 74 70 20 73 65 72 76 65 | 72 20 2a 2f 0d 73 68 6f |tp serve|r */.sho|
|00001000| 72 74 20 74 66 74 70 61 | 73 6b 3b 09 09 09 09 09 |rt tftpa|sk;.....|
|00001010| 2f 2a 20 71 75 65 72 79 | 20 75 73 65 72 20 61 62 |/* query| user ab|
|00001020| 6f 75 74 20 74 72 61 6e | 73 66 65 72 73 20 2a 2f |out tran|sfers */|
|00001030| 0d 0d 73 68 6f 72 74 20 | 74 72 79 64 73 64 72 61 |..short |trydsdra|
|00001040| 77 3b 09 09 09 09 2f 2a | 20 2a 74 72 79 2a 20 74 |w;..../*| *try* t|
|00001050| 6f 20 75 73 65 20 64 69 | 72 65 63 74 20 74 6f 20 |o use di|rect to |
|00001060| 73 63 72 65 65 6e 20 64 | 72 61 77 69 6e 67 20 2a |screen d|rawing *|
|00001070| 2f 0d 73 68 6f 72 74 20 | 72 69 73 6b 79 64 73 64 |/.short |riskydsd|
|00001080| 72 61 77 3b 09 09 09 09 | 2f 2a 20 6f 6e 6c 79 20 |raw;....|/* only |
|00001090| 75 73 65 20 64 73 64 72 | 61 77 20 69 6e 20 46 72 |use dsdr|aw in Fr|
|000010a0| 6f 6e 74 57 69 6e 64 6f | 77 28 29 20 2a 2f 0d 0d |ontWindo|w() */..|
|000010b0| 50 69 63 48 61 6e 64 6c | 65 20 73 68 72 69 6e 6b |PicHandl|e shrink|
|000010c0| 70 69 63 74 3b 09 09 09 | 2f 2a 20 70 69 63 74 75 |pict;...|/* pictu|
|000010d0| 72 65 20 66 6f 72 20 73 | 68 72 69 6e 6b 20 63 6f |re for s|hrink co|
|000010e0| 6e 74 72 6f 6c 20 2a 2f | 0d 50 69 63 48 61 6e 64 |ntrol */|.PicHand|
|000010f0| 6c 65 20 74 61 70 65 70 | 69 63 74 3b 09 09 09 09 |le tapep|ict;....|
|00001100| 2f 2a 20 70 69 63 74 75 | 72 65 20 6f 66 20 63 61 |/* pictu|re of ca|
|00001110| 73 73 65 74 74 65 20 74 | 61 70 65 20 2a 2f 0d 0d |ssette t|ape */..|
|00001120| 73 68 6f 72 74 20 69 63 | 6f 6e 5f 75 70 3b 09 09 |short ic|on_up;..|
|00001130| 09 09 09 2f 2a 20 69 63 | 6f 6e 77 69 6e 64 6f 77 |.../* ic|onwindow|
|00001140| 20 69 73 20 75 70 20 66 | 6f 72 20 74 6f 70 20 77 | is up f|or top w|
|00001150| 69 6e 64 6f 77 20 2a 2f | 0d 0d 6c 6f 6e 67 20 6c |indow */|..long l|
|00001160| 6f 6e 67 31 3b 09 09 09 | 09 09 09 2f 2a 20 75 73 |ong1;...|.../* us|
|00001170| 65 66 75 6c 20 73 74 6f | 72 61 67 65 20 66 6f 72 |eful sto|rage for|
|00001180| 20 61 73 73 65 6d 62 6c | 79 20 72 6f 75 74 69 6e | assembl|y routin|
|00001190| 65 73 20 2a 2f 0d 6c 6f | 6e 67 20 6c 6f 6e 67 32 |es */.lo|ng long2|
|000011a0| 3b 0d 6c 6f 6e 67 20 6c | 6f 6e 67 33 3b 0d 6c 6f |;.long l|ong3;.lo|
|000011b0| 6e 67 20 6c 6f 6e 67 34 | 3b 0d 0d 54 45 48 61 6e |ng long4|;..TEHan|
|000011c0| 64 6c 65 20 68 65 6c 70 | 74 65 68 61 6e 64 3b 0d |dle help|tehand;.|
|000011d0| 57 69 6e 64 6f 77 50 74 | 72 20 68 65 6c 70 77 69 |WindowPt|r helpwi|
|000011e0| 6e 64 3b 0d 6c 6f 6e 67 | 20 66 69 6c 6c 74 69 6d |nd;.long| filltim|
|000011f0| 65 6f 75 74 3b 0d 0d 2f | 2a 20 6d 6f 75 73 65 72 |eout;../|* mouser|
|00001200| 65 63 74 20 73 69 7a 69 | 6e 67 20 61 6e 64 20 74 |ect sizi|ng and t|
|00001210| 72 61 63 6b 69 6e 67 20 | 6f 66 20 63 75 72 73 6f |racking |of curso|
|00001220| 72 20 2a 2f 0d 0d 73 68 | 6f 72 74 20 20 74 72 61 |r */..sh|ort tra|
|00001230| 63 6b 6f 6e 3b 09 09 09 | 09 09 2f 2a 20 66 6c 61 |ckon;...|../* fla|
|00001240| 67 20 66 6f 72 20 63 75 | 72 73 6f 72 20 74 72 61 |g for cu|rsor tra|
|00001250| 63 6b 69 6e 67 20 6f 6e | 20 2a 2f 0d 52 65 63 74 |cking on| */.Rect|
|00001260| 20 6d 6f 75 73 65 72 65 | 63 74 3b 09 09 09 09 09 | mousere|ct;.....|
|00001270| 2f 2a 20 61 6c 73 6f 20 | 75 73 65 64 20 62 79 20 |/* also |used by |
|00001280| 68 31 39 63 75 72 73 65 | 74 20 74 6f 20 66 69 6e |h19curse|t to fin|
|00001290| 64 20 74 68 65 20 74 61 | 72 67 65 74 65 64 20 78 |d the ta|rgeted x|
|000012a0| 2c 79 20 2a 2f 0d 73 68 | 6f 72 74 20 69 6e 65 6d |,y */.sh|ort inem|
|000012b0| 75 6c 61 74 6f 72 3b 09 | 09 09 09 2f 2a 20 61 6e |ulator;.|.../* an|
|000012c0| 20 65 6d 75 6c 61 74 6f | 72 20 69 73 20 69 6e 20 | emulato|r is in |
|000012d0| 75 73 65 20 2a 2f 0d 73 | 68 6f 72 74 20 63 6c 69 |use */.s|hort cli|
|000012e0| 63 6b 64 65 6c 61 79 20 | 3d 20 31 30 3b 09 09 09 |ckdelay |= 10;...|
|000012f0| 2f 2a 20 23 20 6f 66 20 | 74 69 63 6b 73 20 74 6f |/* # of |ticks to|
|00001300| 20 77 61 69 74 20 62 65 | 66 6f 72 65 20 73 65 74 | wait be|fore set|
|00001310| 74 69 6e 67 20 61 20 73 | 65 6c 65 63 74 69 6f 6e |ting a s|election|
|00001320| 20 2a 2f 0d 0d 2f 2a 20 | 43 75 72 73 6f 72 73 20 | */../* |Cursors |
|00001330| 2a 2f 0d 0d 52 65 63 74 | 09 63 75 72 73 72 65 63 |*/..Rect|.cursrec|
|00001340| 74 3b 09 09 09 09 2f 2a | 20 69 6e 76 69 6f 6c 61 |t;..../*| inviola|
|00001350| 62 6c 65 20 63 75 72 73 | 6f 72 20 52 65 63 74 20 |ble curs|or Rect |
|00001360| 2a 2f 0d 73 68 6f 72 74 | 09 63 75 72 73 6f 6e 3b |*/.short|.curson;|
|00001370| 09 09 09 09 09 2f 2a 20 | 63 75 72 73 6f 72 20 73 |...../* |cursor s|
|00001380| 74 61 74 65 20 6f 6e 20 | 6f 72 20 6f 66 66 20 2a |tate on |or off *|
|00001390| 2f 0d 43 75 72 73 6f 72 | 09 62 6c 61 6e 6b 20 3d |/.Cursor|.blank =|
|000013a0| 20 7b 20 0d 09 30 2c 20 | 30 2c 20 30 2c 20 30 2c | { ..0, |0, 0, 0,|
|000013b0| 20 30 2c 20 30 2c 20 30 | 2c 20 30 2c 20 30 2c 20 | 0, 0, 0|, 0, 0, |
|000013c0| 30 2c 20 30 2c 20 30 2c | 20 30 2c 20 30 2c 20 30 |0, 0, 0,| 0, 0, 0|
|000013d0| 2c 20 30 2c 0d 09 30 2c | 20 30 2c 20 30 2c 20 30 |, 0,..0,| 0, 0, 0|
|000013e0| 2c 20 30 2c 20 30 2c 20 | 30 2c 20 30 2c 20 30 2c |, 0, 0, |0, 0, 0,|
|000013f0| 20 30 2c 20 30 2c 20 30 | 2c 20 30 2c 20 30 2c 20 | 0, 0, 0|, 0, 0, |
|00001400| 30 2c 20 30 2c 0d 09 38 | 2c 20 38 20 7d 3b 0d 43 |0, 0,..8|, 8 };.C|
|00001410| 75 72 73 6f 72 20 2a 20 | 74 68 65 63 75 72 73 6f |ursor * |thecurso|
|00001420| 72 20 3d 20 26 62 6c 61 | 6e 6b 3b 0d 52 65 63 74 |r = &bla|nk;.Rect|
|00001430| 09 7a 61 70 72 65 63 74 | 3b 09 09 09 09 2f 2a 20 |.zaprect|;..../* |
|00001440| 66 6f 72 20 53 68 69 65 | 6c 64 43 75 72 73 6f 72 |for Shie|ldCursor|
|00001450| 20 2a 2f 0d 53 79 73 50 | 74 72 09 70 61 72 61 6d | */.SysP|tr.param|
|00001460| 70 74 72 3b 09 09 09 09 | 2f 2a 20 70 6f 69 6e 74 |ptr;....|/* point|
|00001470| 65 72 20 74 6f 20 70 61 | 72 61 6d 65 74 65 72 73 |er to pa|rameters|
|00001480| 20 66 6f 72 20 63 75 72 | 73 6f 72 20 62 6c 69 6e | for cur|sor blin|
|00001490| 6b 20 74 69 6d 65 20 2a | 2f 0d 75 6e 73 69 67 6e |k time *|/.unsign|
|000014a0| 65 64 20 6c 6f 6e 67 09 | 63 75 72 73 61 6c 61 72 |ed long.|cursalar|
|000014b0| 6d 3b 09 09 2f 2a 20 74 | 69 63 6b 20 63 6f 75 6e |m;../* t|ick coun|
|000014c0| 74 20 61 74 20 77 68 69 | 63 68 20 74 6f 20 63 68 |t at whi|ch to ch|
|000014d0| 61 6e 67 65 20 63 75 72 | 73 6f 72 20 2a 2f 0d 52 |ange cur|sor */.R|
|000014e0| 67 6e 48 61 6e 64 6c 65 | 20 65 6d 63 6c 69 70 3b |gnHandle| emclip;|
|000014f0| 09 09 09 09 2f 2a 20 68 | 6f 6c 64 73 20 70 72 65 |..../* h|olds pre|
|00001500| 76 69 6f 75 73 20 65 6d | 20 63 6c 69 70 20 72 65 |vious em| clip re|
|00001510| 63 74 20 2a 2f 0d 52 67 | 6e 48 61 6e 64 6c 65 20 |ct */.Rg|nHandle |
|00001520| 71 33 63 6c 69 70 3b 09 | 09 09 09 2f 2a 20 66 6f |q3clip;.|.../* fo|
|00001530| 72 20 63 61 6c 63 75 6c | 61 74 69 6e 67 20 6e 65 |r calcul|ating ne|
|00001540| 77 20 63 6c 69 70 20 77 | 2f 6f 20 71 33 20 62 6f |w clip w|/o q3 bo|
|00001550| 78 20 2a 2f 0d 09 09 09 | 09 09 09 09 09 0d 0d 2f |x */....|......./|
|00001560| 2a 20 71 33 20 63 6f 6e | 74 72 6f 6c 20 67 6c 6f |* q3 con|trol glo|
|00001570| 62 61 6c 73 20 2a 2f 0d | 73 68 6f 72 74 20 71 33 |bals */.|short q3|
|00001580| 63 6f 6e 74 68 3b 09 09 | 09 09 09 2f 2a 20 68 65 |conth;..|.../* he|
|00001590| 69 67 68 74 20 6f 66 20 | 71 75 61 64 72 61 6e 74 |ight of |quadrant|
|000015a0| 20 33 20 63 6f 6e 74 72 | 6f 6c 20 62 75 74 74 6f | 3 contr|ol butto|
|000015b0| 6e 20 2a 2f 0d 73 68 6f | 72 74 20 71 33 63 6f 6e |n */.sho|rt q3con|
|000015c0| 74 73 6b 69 70 3b 09 09 | 09 09 2f 2a 20 73 69 7a |tskip;..|../* siz|
|000015d0| 65 20 6f 66 20 73 6b 69 | 70 20 65 76 65 72 79 20 |e of ski|p every |
|000015e0| 33 20 62 75 74 74 6f 6e | 73 20 2a 2f 0d 52 65 63 |3 button|s */.Rec|
|000015f0| 74 20 62 6f 78 72 65 63 | 74 3b 09 09 09 09 2f 2a |t boxrec|t;..../*|
|00001600| 20 62 6f 78 20 69 6e 20 | 77 68 69 63 68 20 74 68 | box in |which th|
|00001610| 65 20 71 33 20 62 75 74 | 74 6f 6e 20 6c 61 62 65 |e q3 but|ton labe|
|00001620| 6c 73 20 61 72 65 20 64 | 72 61 77 6e 20 2a 2f 0d |ls are d|rawn */.|
|00001630| 0d 2f 2a 20 63 68 61 72 | 61 63 74 65 72 20 69 6d |./* char|acter im|
|00001640| 61 67 65 73 20 66 6f 72 | 20 64 69 72 65 63 74 20 |ages for| direct |
|00001650| 74 6f 20 73 63 72 65 65 | 6e 20 64 72 61 77 69 6e |to scree|n drawin|
|00001660| 67 20 2a 2f 0d 0d 46 4f | 4e 54 53 09 66 6f 6e 74 |g */..FO|NTS.font|
|00001670| 3b 09 09 09 09 09 2f 2a | 20 6e 6f 72 6d 61 6c 20 |;...../*| normal |
|00001680| 66 6f 6e 74 20 2a 2f 0d | 46 4f 4e 54 53 09 69 6e |font */.|FONTS.in|
|00001690| 76 66 6f 6e 74 3b 09 09 | 09 09 2f 2a 20 69 6e 76 |vfont;..|../* inv|
|000016a0| 65 72 74 65 64 20 2a 2f | 0d 46 4f 4e 54 53 09 62 |erted */|.FONTS.b|
|000016b0| 6f 6c 64 66 6f 6e 74 3b | 09 09 09 09 2f 2a 20 62 |oldfont;|..../* b|
|000016c0| 6f 6c 64 20 66 6f 6e 74 | 20 2a 2f 0d 46 4f 4e 54 |old font| */.FONT|
|000016d0| 53 09 69 6e 76 62 6f 6c | 64 66 6f 6e 74 3b 09 09 |S.invbol|dfont;..|
|000016e0| 09 2f 2a 20 69 6e 76 65 | 72 74 65 64 20 2a 2f 0d |./* inve|rted */.|
|000016f0| 46 4f 4e 54 53 09 62 76 | 74 66 6f 6e 74 3b 09 09 |FONTS.bv|tfont;..|
|00001700| 09 09 2f 2a 20 76 74 20 | 66 6f 6e 74 20 2a 2f 0d |../* vt |font */.|
|00001710| 46 4f 4e 54 53 09 69 6e | 76 62 76 74 66 6f 6e 74 |FONTS.in|vbvtfont|
|00001720| 3b 09 09 09 09 2f 2a 20 | 69 6e 76 65 72 74 65 64 |;..../* |inverted|
|00001730| 20 2a 2f 0d 0d 73 68 6f | 72 74 20 2a 20 63 68 6f | */..sho|rt * cho|
|00001740| 66 66 74 61 62 39 3b 09 | 09 09 09 2f 2a 20 61 72 |fftab9;.|.../* ar|
|00001750| 72 61 79 20 6f 66 20 63 | 68 61 72 61 63 74 65 72 |ray of c|haracter|
|00001760| 20 6f 66 66 73 65 74 73 | 20 74 6f 20 61 76 6f 69 | offsets| to avoi|
|00001770| 64 20 6d 75 6c 74 69 70 | 6c 69 65 73 20 2a 2f 0d |d multip|lies */.|
|00001780| 73 68 6f 72 74 20 2a 20 | 63 68 6f 66 66 74 61 62 |short * |chofftab|
|00001790| 31 32 3b 09 09 09 09 2f | 2a 20 61 72 72 61 79 20 |12;..../|* array |
|000017a0| 6f 66 20 63 68 61 72 61 | 63 74 65 72 20 6f 66 66 |of chara|cter off|
|000017b0| 73 65 74 73 20 74 6f 20 | 61 76 6f 69 64 20 6d 75 |sets to |avoid mu|
|000017c0| 6c 74 69 70 6c 69 65 73 | 20 2a 2f 0d 0d 52 67 6e |ltiplies| */..Rgn|
|000017d0| 48 61 6e 64 6c 65 20 75 | 70 64 61 74 65 52 67 6e |Handle u|pdateRgn|
|000017e0| 3b 09 09 09 2f 2a 20 72 | 67 6e 20 66 6f 72 20 73 |;.../* r|gn for s|
|000017f0| 63 72 6f 6c 6c 20 75 70 | 64 61 74 65 20 72 65 67 |croll up|date reg|
|00001800| 69 6f 6e 73 20 2a 2f 0d | 0d 73 68 6f 72 74 20 62 |ions */.|.short b|
|00001810| 6b 72 64 5f 61 63 74 20 | 3d 20 31 3b 09 09 09 09 |krd_act |= 1;....|
|00001820| 2f 2a 20 69 73 20 74 63 | 70 20 72 75 6e 6e 69 6e |/* is tc|p runnin|
|00001830| 67 20 69 6e 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |g in bac|kground |
|00001840| 6d 6f 64 65 3f 20 2a 2f | 0d 0d 52 65 63 74 20 64 |mode? */|..Rect d|
|00001850| 72 61 67 72 65 63 74 3b | 09 09 09 09 09 2f 2a 20 |ragrect;|...../* |
|00001860| 74 68 65 20 64 72 61 67 | 20 72 65 63 74 61 6e 67 |the drag| rectang|
|00001870| 6c 65 20 66 6f 72 20 61 | 6c 6c 20 77 69 6e 64 6f |le for a|ll windo|
|00001880| 77 73 20 2a 2f 0d 0d 2f | 2a 20 77 65 20 75 73 65 |ws */../|* we use|
|00001890| 20 61 20 62 69 74 20 61 | 72 72 61 79 20 74 6f 20 | a bit a|rray to |
|000018a0| 6d 61 72 6b 20 64 69 72 | 74 79 20 6c 69 6e 65 73 |mark dir|ty lines|
|000018b0| 20 61 60 20 6c 61 20 7a | 61 70 63 68 61 72 2c 20 | a` la z|apchar, |
|000018c0| 68 65 72 65 20 61 72 65 | 20 74 68 65 20 6d 61 73 |here are| the mas|
|000018d0| 6b 73 20 2a 2f 0d 0d 75 | 6e 73 69 67 6e 65 64 20 |ks */..u|nsigned |
|000018e0| 6c 6f 6e 67 20 6d 6f 64 | 6d 61 73 6b 5b 33 32 5d |long mod|mask[32]|
|000018f0| 20 3d 20 7b 0d 09 30 78 | 30 30 30 30 30 30 30 31 | = {..0x|00000001|
|00001900| 4c 2c 0d 09 30 78 30 30 | 30 30 30 30 30 32 4c 2c |L,..0x00|000002L,|
|00001910| 0d 09 30 78 30 30 30 30 | 30 30 30 34 4c 2c 0d 09 |..0x0000|0004L,..|
|00001920| 30 78 30 30 30 30 30 30 | 30 38 4c 2c 0d 09 30 78 |0x000000|08L,..0x|
|00001930| 30 30 30 30 30 30 31 30 | 4c 2c 0d 09 30 78 30 30 |00000010|L,..0x00|
|00001940| 30 30 30 30 32 30 4c 2c | 0d 09 30 78 30 30 30 30 |000020L,|..0x0000|
|00001950| 30 30 34 30 4c 2c 0d 09 | 30 78 30 30 30 30 30 30 |0040L,..|0x000000|
|00001960| 38 30 4c 2c 0d 09 30 78 | 30 30 30 30 30 31 30 30 |80L,..0x|00000100|
|00001970| 4c 2c 0d 09 30 78 30 30 | 30 30 30 32 30 30 4c 2c |L,..0x00|000200L,|
|00001980| 0d 09 30 78 30 30 30 30 | 30 34 30 30 4c 2c 0d 09 |..0x0000|0400L,..|
|00001990| 30 78 30 30 30 30 30 38 | 30 30 4c 2c 0d 09 30 78 |0x000008|00L,..0x|
|000019a0| 30 30 30 30 31 30 30 30 | 4c 2c 0d 09 30 78 30 30 |00001000|L,..0x00|
|000019b0| 30 30 32 30 30 30 4c 2c | 0d 09 30 78 30 30 30 30 |002000L,|..0x0000|
|000019c0| 34 30 30 30 4c 2c 0d 09 | 30 78 30 30 30 30 38 30 |4000L,..|0x000080|
|000019d0| 30 30 4c 2c 0d 09 30 78 | 30 30 30 31 30 30 30 30 |00L,..0x|00010000|
|000019e0| 4c 2c 0d 09 30 78 30 30 | 30 32 30 30 30 30 4c 2c |L,..0x00|020000L,|
|000019f0| 0d 09 30 78 30 30 30 34 | 30 30 30 30 4c 2c 0d 09 |..0x0004|0000L,..|
|00001a00| 30 78 30 30 30 38 30 30 | 30 30 4c 2c 0d 09 30 78 |0x000800|00L,..0x|
|00001a10| 30 30 31 30 30 30 30 30 | 4c 2c 0d 09 30 78 30 30 |00100000|L,..0x00|
|00001a20| 32 30 30 30 30 30 4c 2c | 0d 09 30 78 30 30 34 30 |200000L,|..0x0040|
|00001a30| 30 30 30 30 4c 2c 0d 09 | 30 78 30 30 38 30 30 30 |0000L,..|0x008000|
|00001a40| 30 30 4c 2c 0d 09 30 78 | 30 31 30 30 30 30 30 30 |00L,..0x|01000000|
|00001a50| 4c 2c 0d 09 30 78 30 32 | 30 30 30 30 30 30 4c 2c |L,..0x02|000000L,|
|00001a60| 0d 09 30 78 30 34 30 30 | 30 30 30 30 4c 2c 0d 09 |..0x0400|0000L,..|
|00001a70| 30 78 30 38 30 30 30 30 | 30 30 4c 2c 0d 09 30 78 |0x080000|00L,..0x|
|00001a80| 31 30 30 30 30 30 30 30 | 4c 2c 0d 09 30 78 32 30 |10000000|L,..0x20|
|00001a90| 30 30 30 30 30 30 4c 2c | 0d 09 30 78 34 30 30 30 |000000L,|..0x4000|
|00001aa0| 30 30 30 30 4c 2c 0d 09 | 30 78 38 30 30 30 30 30 |0000L,..|0x800000|
|00001ab0| 30 30 4c 0d 7d 3b 0d 0d | 63 68 61 72 20 7a 61 70 |00L.};..|char zap|
|00001ac0| 75 6c 69 6e 65 3b 09 09 | 09 09 09 2f 2a 20 66 6c |uline;..|.../* fl|
|00001ad0| 61 67 20 74 6f 20 7a 61 | 70 63 68 61 72 20 74 6f |ag to za|pchar to|
|00001ae0| 20 75 6e 64 65 72 6c 69 | 6e 65 20 63 68 61 72 61 | underli|ne chara|
|00001af0| 63 74 65 72 20 2a 2f 0d | 63 68 61 72 20 7a 61 70 |cter */.|char zap|
|00001b00| 69 6e 76 65 72 74 3b 09 | 09 09 09 09 2f 2a 20 66 |invert;.|..../* f|
|00001b10| 6c 61 67 20 74 6f 20 7a | 61 70 63 68 61 72 20 74 |lag to z|apchar t|
|00001b20| 6f 20 75 6e 64 65 72 6c | 69 6e 65 20 63 68 61 72 |o underl|ine char|
|00001b30| 61 63 74 65 72 20 2a 2f | 0d 0d 63 68 61 72 20 69 |acter */|..char i|
|00001b40| 6e 73 65 6c 65 63 74 69 | 6f 6e 3b 09 09 09 09 2f |nselecti|on;..../|
|00001b50| 2a 20 66 6c 61 67 20 74 | 68 61 74 20 77 65 20 61 |* flag t|hat we a|
|00001b60| 72 65 20 69 6e 20 73 65 | 6c 65 63 74 69 6f 6e 20 |re in se|lection |
|00001b70| 72 61 6e 67 65 20 2a 2f | 0d 0d 63 68 61 72 20 73 |range */|..char s|
|00001b80| 6b 69 70 61 72 72 5b 4e | 4f 43 48 41 52 53 5d 3b |kiparr[N|OCHARS];|
|00001b90| 09 09 09 2f 2a 20 63 68 | 61 72 73 20 77 68 69 63 |.../* ch|ars whic|
|00001ba0| 68 20 61 72 65 20 62 6c | 61 6e 6b 20 26 20 63 61 |h are bl|ank & ca|
|00001bb0| 6e 20 62 65 20 73 6b 69 | 70 70 65 64 20 2a 2f 0d |n be ski|pped */.|
|00001bc0| 63 68 61 72 20 61 6c 6c | 73 6b 69 70 61 72 72 5b |char all|skiparr[|
|00001bd0| 4e 4f 43 48 41 52 53 5d | 3b 09 09 2f 2a 20 61 6c |NOCHARS]|;../* al|
|00001be0| 74 65 72 6e 61 74 65 20 | 61 6c 6c 2d 54 52 55 45 |ternate |all-TRUE|
|00001bf0| 20 73 6b 69 70 61 72 72 | 20 2a 2f 0d 0d 73 68 6f | skiparr| */..sho|
|00001c00| 72 74 20 6b 65 79 62 6f | 61 72 64 20 3d 20 50 4c |rt keybo|ard = PL|
|00001c10| 55 53 4b 45 59 42 4f 41 | 52 44 3b 09 2f 2a 20 6b |USKEYBOA|RD;./* k|
|00001c20| 65 79 62 6f 61 72 64 20 | 74 79 70 65 20 2a 2f 0d |eyboard |type */.|
|00001c30| 73 68 6f 72 74 20 6b 65 | 79 70 61 64 73 77 69 74 |short ke|ypadswit|
|00001c40| 63 68 3b 09 09 09 09 2f | 2a 20 73 77 69 74 63 68 |ch;..../|* switch|
|00001c50| 20 53 45 20 6b 65 79 70 | 61 64 20 2a 2f 0d 0d 2f | SE keyp|ad */../|
|00001c60| 2a 20 61 20 64 65 66 61 | 75 6c 74 20 69 62 6d 63 |* a defa|ult ibmc|
|00001c70| 6f 6c 6f 72 6d 61 70 20 | 2a 2f 0d 0d 73 74 72 75 |olormap |*/..stru|
|00001c80| 63 74 20 69 62 6d 63 6f | 6c 6f 72 6d 61 70 20 69 |ct ibmco|lormap i|
|00001c90| 62 6d 63 6f 6c 6f 72 6d | 61 70 20 3d 20 7b 0d 09 |bmcolorm|ap = {..|
|00001ca0| 09 09 09 09 09 09 09 09 | 09 09 09 2f 2a 20 75 6e |........|.../* un|
|00001cb0| 70 72 6f 74 65 63 74 65 | 64 20 2e 2e 2e 20 2a 2f |protecte|d ... */|
|00001cc0| 0d 09 30 2c 20 30 2c 20 | 30 2c 20 09 09 09 36 35 |..0, 0, |0, ...65|
|00001cd0| 35 33 35 2c 20 36 35 35 | 33 35 2c 20 36 35 35 33 |535, 655|35, 6553|
|00001ce0| 35 2c 09 2f 2a 20 6e 6f | 72 6d 61 6c 20 28 62 6c |5,./* no|rmal (bl|
|00001cf0| 61 63 6b 20 6f 6e 20 77 | 68 69 74 65 29 20 2a 2f |ack on w|hite) */|
|00001d00| 0d 09 35 30 30 30 30 2c | 20 31 30 30 30 2c 20 31 |..50000,| 1000, 1|
|00001d10| 30 30 30 2c 20 09 36 35 | 35 33 35 2c 20 36 35 35 |000, .65|535, 655|
|00001d20| 33 35 2c 20 36 35 35 33 | 35 2c 09 2f 2a 20 73 65 |35, 6553|5,./* se|
|00001d30| 6e 73 65 20 28 72 65 64 | 20 6f 6e 20 77 68 69 74 |nse (red| on whit|
|00001d40| 65 29 20 2a 2f 0d 09 30 | 2c 20 30 2c 20 30 2c 20 |e) */..0|, 0, 0, |
|00001d50| 09 09 09 36 35 35 33 35 | 2c 20 36 35 35 33 35 2c |...65535|, 65535,|
|00001d60| 20 36 35 35 33 35 2c 09 | 2f 2a 20 69 6e 74 65 6e | 65535,.|/* inten|
|00001d70| 73 65 20 28 62 6c 61 63 | 6b 20 6f 6e 20 77 68 69 |se (blac|k on whi|
|00001d80| 74 65 29 20 2a 2f 0d 09 | 30 2c 20 30 2c 20 30 2c |te) */..|0, 0, 0,|
|00001d90| 20 09 09 09 36 35 35 33 | 35 2c 20 36 35 35 33 35 | ...6553|5, 65535|
|00001da0| 2c 20 36 35 35 33 35 2c | 09 2f 2a 20 69 6e 76 69 |, 65535,|./* invi|
|00001db0| 73 20 28 62 6c 61 63 6b | 20 6f 6e 20 77 68 69 74 |s (black| on whit|
|00001dc0| 65 29 20 2a 2f 0d 0d 09 | 09 09 09 09 09 09 09 09 |e) */...|........|
|00001dd0| 09 09 09 2f 2a 20 70 72 | 6f 74 65 63 74 65 64 20 |.../* pr|otected |
|00001de0| 2e 2e 2e 20 2a 2f 0d 09 | 30 2c 20 30 2c 20 30 2c |... */..|0, 0, 0,|
|00001df0| 20 09 09 09 36 35 35 33 | 35 2c 20 36 35 35 33 35 | ...6553|5, 65535|
|00001e00| 2c 20 36 35 35 33 35 2c | 09 2f 2a 20 6e 6f 72 6d |, 65535,|./* norm|
|00001e10| 61 6c 20 28 62 6c 61 63 | 6b 20 6f 6e 20 77 68 69 |al (blac|k on whi|
|00001e20| 74 65 29 20 2a 2f 0d 09 | 35 30 30 30 30 2c 20 31 |te) */..|50000, 1|
|00001e30| 30 30 30 2c 20 31 30 30 | 30 2c 20 09 36 35 35 33 |000, 100|0, .6553|
|00001e40| 35 2c 20 36 35 35 33 35 | 2c 20 36 35 35 33 35 2c |5, 65535|, 65535,|
|00001e50| 09 2f 2a 20 73 65 6e 73 | 65 20 28 72 65 64 20 6f |./* sens|e (red o|
|00001e60| 6e 20 77 68 69 74 65 29 | 20 2a 2f 0d 09 30 2c 20 |n white)| */..0, |
|00001e70| 30 2c 20 30 2c 20 20 20 | 20 20 20 20 20 09 36 35 |0, 0, | .65|
|00001e80| 35 33 35 2c 20 36 35 35 | 33 35 2c 20 36 35 35 33 |535, 655|35, 6553|
|00001e90| 35 2c 09 2f 2a 20 69 6e | 74 65 6e 73 65 20 28 62 |5,./* in|tense (b|
|00001ea0| 6c 61 63 6b 20 6f 6e 20 | 77 68 69 74 65 29 20 2a |lack on |white) *|
|00001eb0| 2f 0d 09 30 2c 20 30 2c | 20 30 2c 20 09 09 09 36 |/..0, 0,| 0, ...6|
|00001ec0| 35 35 33 35 2c 20 36 35 | 35 33 35 2c 20 36 35 35 |5535, 65|535, 655|
|00001ed0| 33 35 09 09 2f 2a 20 69 | 6e 76 69 73 20 28 62 6c |35../* i|nvis (bl|
|00001ee0| 61 63 6b 20 6f 6e 20 77 | 68 69 74 65 29 20 2a 2f |ack on w|hite) */|
|00001ef0| 0d 7d 3b 0d 0d 73 74 72 | 75 63 74 20 69 62 6d 63 |.};..str|uct ibmc|
|00001f00| 6f 6c 6f 72 6d 61 70 20 | 61 73 63 63 6f 6c 6f 72 |olormap |asccolor|
|00001f10| 6d 61 70 20 3d 20 7b 0d | 09 30 78 30 30 30 30 2c |map = {.|.0x0000,|
|00001f20| 20 30 78 30 30 30 30 2c | 20 30 78 30 30 30 30 2c | 0x0000,| 0x0000,|
|00001f30| 20 30 78 46 46 46 46 2c | 20 30 78 46 46 46 46 2c | 0xFFFF,| 0xFFFF,|
|00001f40| 20 30 78 46 46 46 46 2c | 09 09 2f 2a 20 6e 6f 72 | 0xFFFF,|../* nor|
|00001f50| 6d 61 6c 20 28 62 6c 61 | 63 6b 20 6f 6e 20 77 68 |mal (bla|ck on wh|
|00001f60| 69 74 65 29 20 2a 2f 0d | 09 30 78 46 46 46 46 2c |ite) */.|.0xFFFF,|
|00001f70| 20 30 78 46 46 46 46 2c | 20 30 78 46 46 46 46 2c | 0xFFFF,| 0xFFFF,|
|00001f80| 20 30 78 30 30 30 30 2c | 20 30 78 30 30 30 30 2c | 0x0000,| 0x0000,|
|00001f90| 20 30 78 30 30 30 30 2c | 09 09 2f 2a 20 72 65 76 | 0x0000,|../* rev|
|00001fa0| 65 72 73 65 20 28 77 68 | 69 74 65 20 6f 6e 20 62 |erse (wh|ite on b|
|00001fb0| 6c 61 63 6b 29 20 2a 2f | 0d 09 30 78 46 46 46 46 |lack) */|..0xFFFF|
|00001fc0| 2c 20 30 78 30 30 30 30 | 2c 20 30 78 30 30 30 30 |, 0x0000|, 0x0000|
|00001fd0| 2c 20 30 78 46 46 46 46 | 2c 20 30 78 46 46 46 46 |, 0xFFFF|, 0xFFFF|
|00001fe0| 2c 20 30 78 46 46 46 46 | 2c 09 09 2f 2a 20 62 6f |, 0xFFFF|,../* bo|
|00001ff0| 6c 64 20 28 72 65 64 20 | 6f 6e 20 77 68 69 74 65 |ld (red |on white|
|00002000| 29 20 2a 2f 0d 09 30 78 | 46 46 46 46 2c 20 30 78 |) */..0x|FFFF, 0x|
|00002010| 46 46 46 46 2c 20 30 78 | 46 46 46 46 2c 20 30 78 |FFFF, 0x|FFFF, 0x|
|00002020| 46 46 46 46 2c 20 30 78 | 30 30 30 30 2c 20 30 78 |FFFF, 0x|0000, 0x|
|00002030| 30 30 30 30 2c 20 09 2f | 2a 20 62 6f 6c 64 20 72 |0000, ./|* bold r|
|00002040| 65 76 65 72 73 65 20 28 | 77 68 69 74 65 20 6f 6e |everse (|white on|
|00002050| 20 72 65 64 29 20 2a 2f | 0d 0d 09 09 09 09 09 09 | red) */|........|
|00002060| 09 09 09 09 09 09 09 09 | 2f 2a 20 62 6c 69 6e 6b |........|/* blink|
|00002070| 20 2e 2e 2e 20 2a 2f 0d | 09 30 78 30 30 30 30 2c | ... */.|.0x0000,|
|00002080| 20 30 78 30 30 30 30 2c | 20 30 78 30 30 30 30 2c | 0x0000,| 0x0000,|
|00002090| 20 30 78 46 46 37 30 2c | 20 30 78 46 46 46 46 2c | 0xFF70,| 0xFFFF,|
|000020a0| 20 30 78 33 37 35 32 2c | 20 09 2f 2a 20 62 6c 61 | 0x3752,| ./* bla|
|000020b0| 63 6b 20 6f 6e 20 79 65 | 6c 6c 6f 77 20 2a 2f 0d |ck on ye|llow */.|
|000020c0| 09 30 78 46 46 37 30 2c | 20 30 78 46 46 46 46 2c |.0xFF70,| 0xFFFF,|
|000020d0| 20 30 78 33 37 35 32 2c | 20 30 78 30 30 30 30 2c | 0x3752,| 0x0000,|
|000020e0| 20 30 78 30 30 30 30 2c | 20 30 78 30 30 30 30 2c | 0x0000,| 0x0000,|
|000020f0| 20 09 2f 2a 20 72 65 76 | 3a 20 59 65 6c 6c 6f 77 | ./* rev|: Yellow|
|00002100| 20 6f 6e 20 62 6c 61 63 | 6b 20 2a 2f 0d 09 30 78 | on blac|k */..0x|
|00002110| 46 46 46 46 2c 20 30 78 | 30 30 30 30 2c 20 30 78 |FFFF, 0x|0000, 0x|
|00002120| 30 30 30 30 2c 20 30 78 | 46 46 37 30 2c 20 30 78 |0000, 0x|FF70, 0x|
|00002130| 46 46 46 46 2c 20 30 78 | 33 37 35 32 2c 20 09 2f |FFFF, 0x|3752, ./|
|00002140| 2a 20 62 6f 6c 64 3a 20 | 72 65 64 20 6f 6e 20 79 |* bold: |red on y|
|00002150| 65 6c 6c 6f 77 20 2a 2f | 0d 09 30 78 46 46 37 30 |ellow */|..0xFF70|
|00002160| 2c 20 30 78 46 46 46 46 | 2c 20 30 78 33 37 35 32 |, 0xFFFF|, 0x3752|
|00002170| 2c 20 30 78 46 46 46 46 | 2c 20 30 78 30 30 30 30 |, 0xFFFF|, 0x0000|
|00002180| 2c 20 30 78 30 30 30 30 | 2c 20 09 2f 2a 20 62 6f |, 0x0000|, ./* bo|
|00002190| 6c 64 72 65 76 3a 20 79 | 65 6c 6c 6f 77 20 6f 6e |ldrev: y|ellow on|
|000021a0| 20 72 65 64 20 2a 2f 0d | 7d 3b 0d 0d 2f 2a 20 54 | red */.|};../* T|
|000021b0| 4f 44 4f 20 69 64 65 61 | 6c 6c 79 20 74 68 65 20 |ODO idea|lly the |
|000021c0| 73 74 72 69 6e 67 73 20 | 61 6e 64 20 61 63 74 69 |strings |and acti|
|000021d0| 6f 6e 73 20 61 73 73 6f | 63 69 61 74 65 64 20 77 |ons asso|ciated w|
|000021e0| 69 74 68 20 74 68 65 20 | 33 72 64 20 71 75 61 64 |ith the |3rd quad|
|000021f0| 72 61 6e 74 20 62 75 74 | 74 6f 6e 73 0d 09 77 6f |rant but|tons..wo|
|00002200| 75 6c 64 20 62 65 20 72 | 65 63 6f 6e 66 69 67 75 |uld be r|econfigu|
|00002210| 72 61 62 6c 65 20 6f 6e | 20 61 20 70 65 72 2d 77 |rable on| a per-w|
|00002220| 69 6e 64 6f 77 20 62 61 | 73 69 73 2e 2e 2e 20 2a |indow ba|sis... *|
|00002230| 2f 0d 09 0d 63 68 61 72 | 20 2a 20 71 33 73 74 72 |/...char| * q3str|
|00002240| 69 6e 67 73 5b 5d 20 3d | 20 7b 0d 09 22 50 46 31 |ings[] =| {.."PF1|
|00002250| 22 2c 0d 09 22 50 46 32 | 22 2c 0d 09 22 50 46 33 |",.."PF2|",.."PF3|
|00002260| 22 2c 0d 09 22 50 46 34 | 22 2c 0d 09 22 50 46 35 |",.."PF4|",.."PF5|
|00002270| 22 2c 0d 09 22 50 46 36 | 22 2c 0d 09 22 50 46 37 |",.."PF6|",.."PF7|
|00002280| 22 2c 0d 09 22 50 46 38 | 22 2c 0d 09 22 50 46 39 |",.."PF8|",.."PF9|
|00002290| 22 2c 0d 09 22 50 46 31 | 30 22 2c 0d 09 22 50 46 |",.."PF1|0",.."PF|
|000022a0| 31 31 22 2c 0d 09 22 50 | 46 31 32 22 2c 0d 09 22 |11",.."P|F12",.."|
|000022b0| 50 46 31 33 22 2c 0d 09 | 22 50 46 31 34 22 2c 0d |PF13",..|"PF14",.|
|000022c0| 09 22 50 46 31 35 22 2c | 0d 09 22 50 46 31 36 22 |."PF15",|.."PF16"|
|000022d0| 2c 0d 09 22 50 46 31 37 | 22 2c 0d 09 22 50 46 31 |,.."PF17|",.."PF1|
|000022e0| 38 22 2c 0d 09 22 50 46 | 31 39 22 2c 0d 09 22 50 |8",.."PF|19",.."P|
|000022f0| 46 32 30 22 2c 0d 09 22 | 50 46 32 31 22 2c 0d 09 |F20",.."|PF21",..|
|00002300| 22 50 46 32 32 22 2c 0d | 09 22 50 46 32 33 22 2c |"PF22",.|."PF23",|
|00002310| 0d 09 22 50 46 32 34 22 | 2c 0d 09 0d 09 2f 2a 20 |.."PF24"|,..../* |
|00002320| 56 54 35 32 2f 56 54 31 | 30 30 20 6c 61 62 65 6c |VT52/VT1|00 label|
|00002330| 73 20 2a 2f 0d 09 22 4b | 50 20 31 22 2c 0d 09 22 |s */.."K|P 1",.."|
|00002340| 4b 50 20 32 22 2c 0d 09 | 22 4b 50 20 33 22 2c 0d |KP 2",..|"KP 3",.|
|00002350| 09 22 4b 50 20 34 22 2c | 0d 09 22 4b 50 20 35 22 |."KP 4",|.."KP 5"|
|00002360| 2c 0d 09 22 4b 50 20 36 | 22 2c 0d 09 22 4b 50 20 |,.."KP 6|",.."KP |
|00002370| 37 22 2c 0d 09 22 4b 50 | 20 38 22 2c 0d 09 22 4b |7",.."KP| 8",.."K|
|00002380| 50 20 39 22 2c 0d 09 22 | 4b 50 20 30 22 2c 0d 09 |P 9",.."|KP 0",..|
|00002390| 22 4b 50 20 2d 22 2c 0d | 09 22 4b 50 20 2c 20 28 |"KP -",.|."KP , (|
|000023a0| 2b 29 22 2c 0d 09 0d 09 | 22 50 46 31 20 28 47 6f |+)",....|"PF1 (Go|
|000023b0| 6c 64 29 22 2c 0d 09 22 | 50 46 32 20 28 48 65 6c |ld)",.."|PF2 (Hel|
|000023c0| 70 29 22 2c 0d 09 22 50 | 46 33 22 2c 0d 09 22 50 |p)",.."P|F3",.."P|
|000023d0| 46 34 22 2c 0d 09 22 4b | 50 20 2e 22 2c 0d 09 22 |F4",.."K|P .",.."|
|000023e0| 4b 50 20 45 6e 74 65 72 | 22 2c 0d 09 22 46 69 6e |KP Enter|",.."Fin|
|000023f0| 64 22 2c 0d 09 22 49 6e | 73 65 72 74 20 48 65 72 |d",.."In|sert Her|
|00002400| 65 22 2c 0d 09 22 52 65 | 6d 6f 76 65 22 2c 0d 09 |e",.."Re|move",..|
|00002410| 22 53 65 6c 65 63 74 22 | 2c 0d 09 22 50 72 65 76 |"Select"|,.."Prev|
|00002420| 20 53 63 72 65 65 6e 22 | 2c 0d 09 22 4e 65 78 74 | Screen"|,.."Next|
|00002430| 20 53 63 72 65 65 6e 22 | 0d 7d 3b 0d 09 0d 2f 2a | Screen"|.};.../*|
|00002440| 20 66 6f 72 20 41 53 43 | 49 49 20 76 74 31 30 30 | for ASC|II vt100|
|00002450| 20 6d 6f 64 65 20 2a 2f | 0d 09 09 09 0d 63 68 61 | mode */|.....cha|
|00002460| 72 20 71 33 76 74 63 6f | 6e 74 72 6f 6c 73 5b 5d |r q3vtco|ntrols[]|
|00002470| 20 3d 20 7b 0d 27 71 27 | 2c 0d 27 72 27 2c 0d 27 | = {.'q'|,.'r',.'|
|00002480| 73 27 2c 0d 27 74 27 2c | 0d 27 75 27 2c 0d 27 76 |s',.'t',|.'u',.'v|
|00002490| 27 2c 0d 27 77 27 2c 0d | 27 78 27 2c 0d 27 79 27 |',.'w',.|'x',.'y'|
|000024a0| 2c 0d 27 70 27 2c 0d 27 | 6d 27 2c 0d 27 6c 27 2c |,.'p',.'|m',.'l',|
|000024b0| 0d 0d 27 50 27 2c 0d 27 | 51 27 2c 0d 27 52 27 2c |..'P',.'|Q',.'R',|
|000024c0| 0d 27 53 27 2c 0d 27 6e | 27 2c 0d 27 4d 27 2c 0d |.'S',.'n|',.'M',.|
|000024d0| 27 31 27 2c 0d 27 32 27 | 2c 0d 27 33 27 2c 0d 27 |'1',.'2'|,.'3',.'|
|000024e0| 34 27 2c 0d 27 35 27 2c | 0d 27 36 27 0d 7d 3b 0d |4',.'5',|.'6'.};.|
|000024f0| 0d 2f 2a 20 66 6f 72 20 | 41 53 43 49 49 20 6d 6f |./* for |ASCII mo|
|00002500| 64 65 20 2a 2f 0d 09 09 | 09 0d 63 68 61 72 20 71 |de */...|..char q|
|00002510| 33 63 6f 6e 74 72 6f 6c | 73 5b 5d 20 3d 20 7b 0d |3control|s[] = {.|
|00002520| 27 53 27 2c 0d 27 54 27 | 2c 0d 27 55 27 2c 0d 27 |'S',.'T'|,.'U',.'|
|00002530| 56 27 2c 0d 27 57 27 2c | 0d 27 58 27 2c 0d 27 59 |V',.'W',|.'X',.'Y|
|00002540| 27 2c 0d 27 5a 27 2c 0d | 27 5b 27 2c 0d 27 50 27 |',.'Z',.|'[',.'P'|
|00002550| 2c 0d 27 51 27 2c 0d 27 | 52 27 0d 7d 3b 0d 0d 63 |,.'Q',.'|R'.};..c|
|00002560| 68 61 72 20 2a 20 6e 6f | 73 65 73 73 69 6f 6e 73 |har * no|sessions|
|00002570| 74 72 20 3d 20 22 53 65 | 73 73 69 6f 6e 20 63 6c |tr = "Se|ssion cl|
|00002580| 6f 73 65 64 22 3b 0d 63 | 68 61 72 20 2a 20 68 6f |osed";.c|har * ho|
|00002590| 73 74 77 61 69 74 20 3d | 20 22 43 6f 6e 6e 65 63 |stwait =| "Connec|
|000025a0| 74 69 6e 67 20 74 6f 20 | 68 6f 73 74 2e 2e 2e 22 |ting to |host..."|
|000025b0| 3b 0d 63 68 61 72 20 2a | 20 62 61 64 61 64 64 72 |;.char *| badaddr|
|000025c0| 65 73 73 20 3d 20 22 49 | 6e 76 61 6c 69 64 20 68 |ess = "I|nvalid h|
|000025d0| 6f 73 74 20 61 64 64 72 | 65 73 73 22 3b 0d 0d 0d |ost addr|ess";...|
|000025e0| 2f 2a 20 42 49 47 47 20 | 70 72 65 73 65 72 76 65 |/* BIGG |preserve|
|000025f0| 20 61 73 20 67 6c 6f 62 | 61 6c 73 20 66 6f 72 20 | as glob|als for |
|00002600| 62 65 74 74 65 72 20 73 | 70 65 65 64 20 2a 2f 0d |better s|peed */.|
|00002610| 0d 2f 2a 20 73 68 61 72 | 65 64 20 42 49 47 47 20 |./* shar|ed BIGG |
|00002620| 2a 2f 0d 0d 2f 2a 20 75 | 73 65 64 20 62 79 20 64 |*/../* u|sed by d|
|00002630| 73 64 72 61 77 20 7a 61 | 70 2e 61 73 6d 20 72 6f |sdraw za|p.asm ro|
|00002640| 75 74 69 6e 65 73 20 2a | 2f 0d 0d 46 4f 4e 54 53 |utines *|/..FONTS|
|00002650| 20 2a 74 68 65 66 6f 6e | 74 3b 09 09 09 09 09 2f | *thefon|t;...../|
|00002660| 2a 20 42 49 47 47 20 2a | 2f 0d 73 68 6f 72 74 20 |* BIGG *|/.short |
|00002670| 78 70 6f 73 2c 20 79 70 | 6f 73 3b 09 09 09 09 2f |xpos, yp|os;..../|
|00002680| 2a 20 42 49 47 47 20 63 | 75 72 72 65 6e 74 20 78 |* BIGG c|urrent x|
|00002690| 2c 20 79 20 70 6f 73 69 | 74 69 6f 6e 20 2a 2f 0d |, y posi|tion */.|
|000026a0| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 6d 6f |unsigned| long mo|
|000026b0| 64 66 6c 67 3b 09 09 09 | 2f 2a 20 42 49 47 47 20 |dflg;...|/* BIGG |
|000026c0| 6c 69 6e 65 20 6d 6f 64 | 69 66 69 65 64 20 62 69 |line mod|ified bi|
|000026d0| 74 20 61 72 72 61 79 20 | 2a 2f 0d 75 6e 73 69 67 |t array |*/.unsig|
|000026e0| 6e 65 64 20 6c 6f 6e 67 | 20 63 6c 72 66 6c 67 3b |ned long| clrflg;|
|000026f0| 09 09 09 2f 2a 20 42 49 | 47 47 20 6c 69 6e 65 20 |.../* BI|GG line |
|00002700| 63 6c 65 61 72 65 64 20 | 62 69 74 20 61 72 72 61 |cleared |bit arra|
|00002710| 79 20 2a 2f 0d 73 68 6f | 72 74 20 66 6f 6e 74 77 |y */.sho|rt fontw|
|00002720| 69 64 74 68 3b 09 09 09 | 09 2f 2a 20 42 49 47 47 |idth;...|./* BIGG|
|00002730| 20 77 69 64 74 68 20 6f | 66 20 66 6f 6e 74 20 2a | width o|f font *|
|00002740| 2f 0d 73 68 6f 72 74 20 | 2a 2a 20 73 74 61 72 74 |/.short |** start|
|00002750| 61 72 72 3b 09 09 09 09 | 2f 2a 20 42 49 47 47 20 |arr;....|/* BIGG |
|00002760| 64 73 64 72 61 77 20 2d | 3e 20 61 72 72 61 79 20 |dsdraw -|> array |
|00002770| 6f 66 20 70 74 72 73 20 | 74 6f 20 73 63 61 6e 6c |of ptrs |to scanl|
|00002780| 69 6e 65 20 73 74 61 72 | 74 73 20 2a 2f 0d 73 68 |ine star|ts */.sh|
|00002790| 6f 72 74 20 73 63 72 65 | 65 6e 62 79 74 65 73 3b |ort scre|enbytes;|
|000027a0| 09 09 09 09 2f 2a 20 42 | 49 47 47 20 77 69 64 74 |..../* B|IGG widt|
|000027b0| 68 20 6f 66 20 73 63 72 | 65 65 6e 20 69 6e 20 62 |h of scr|een in b|
|000027c0| 79 74 65 73 20 2a 2f 0d | 73 68 6f 72 74 20 73 63 |ytes */.|short sc|
|000027d0| 72 65 65 6e 72 65 6d 3b | 09 09 09 09 2f 2a 20 42 |reenrem;|..../* B|
|000027e0| 49 47 47 20 73 63 72 65 | 65 6e 62 79 74 65 73 20 |IGG scre|enbytes |
|000027f0| 2d 20 73 74 64 20 73 63 | 72 65 65 6e 20 2a 2f 0d |- std sc|reen */.|
|00002800| 63 68 61 72 20 2a 20 73 | 6b 69 70 74 65 73 74 3b |char * s|kiptest;|
|00002810| 09 09 09 09 2f 2a 20 63 | 75 72 72 65 6e 74 20 73 |..../* c|urrent s|
|00002820| 6b 69 70 20 61 72 72 61 | 79 20 74 6f 20 75 73 65 |kip arra|y to use|
|00002830| 20 69 6e 20 7a 61 70 20 | 2a 2f 0d 09 0d 2f 2a 20 | in zap |*/.../* |
|00002840| 68 31 39 20 42 49 47 47 | 20 2a 2f 0d 73 68 6f 72 |h19 BIGG| */.shor|
|00002850| 74 20 6d 6f 64 65 3b 09 | 09 09 09 09 09 2f 2a 20 |t mode;.|...../* |
|00002860| 42 49 47 47 20 69 6e 74 | 65 72 70 72 65 74 61 74 |BIGG int|erpretat|
|00002870| 69 6f 6e 20 6d 6f 64 65 | 20 6f 66 20 65 6d 75 6c |ion mode| of emul|
|00002880| 61 74 6f 72 20 2a 2f 0d | 75 6e 73 69 67 6e 65 64 |ator */.|unsigned|
|00002890| 20 63 68 61 72 20 2a 20 | 63 68 61 72 70 3b 09 09 | char * |charp;..|
|000028a0| 09 2f 2a 20 42 49 47 47 | 20 63 75 72 73 6f 72 20 |./* BIGG| cursor |
|000028b0| 6c 6f 63 20 66 6f 72 20 | 74 68 65 73 65 20 61 72 |loc for |these ar|
|000028c0| 72 61 79 73 20 2a 2f 0d | 73 68 6f 72 74 20 69 6e |rays */.|short in|
|000028d0| 73 65 72 74 6f 6e 3b 09 | 09 09 09 09 2f 2a 20 42 |serton;.|..../* B|
|000028e0| 49 47 47 20 69 6e 73 65 | 72 74 20 6d 6f 64 65 20 |IGG inse|rt mode |
|000028f0| 2a 2f 0d 73 68 6f 72 74 | 20 6c 69 6e 65 6c 65 6e |*/.short| linelen|
|00002900| 67 74 68 3b 09 09 09 09 | 2f 2a 20 42 49 47 47 20 |gth;....|/* BIGG |
|00002910| 77 69 64 74 68 20 6f 66 | 20 72 6f 77 20 2a 2f 0d |width of| row */.|
|00002920| 73 68 6f 72 74 20 6c 61 | 73 74 63 6f 6c 3b 09 09 |short la|stcol;..|
|00002930| 09 09 09 2f 2a 20 42 49 | 47 47 20 6c 69 6e 65 6c |.../* BI|GG linel|
|00002940| 65 6e 67 74 68 20 2d 20 | 31 20 2a 2f 0d 75 6e 73 |ength - |1 */.uns|
|00002950| 69 67 6e 65 64 20 63 68 | 61 72 20 61 74 74 72 69 |igned ch|ar attri|
|00002960| 62 3b 09 09 09 2f 2a 20 | 42 49 47 47 20 6e 6f 72 |b;.../* |BIGG nor|
|00002970| 6d 61 6c 2f 72 65 76 65 | 72 73 65 20 6d 6f 64 65 |mal/reve|rse mode|
|00002980| 20 66 6f 72 20 63 6f 70 | 79 20 64 72 61 77 69 6e | for cop|y drawin|
|00002990| 67 20 2a 2f 0d 0d 73 68 | 6f 72 74 20 77 72 61 70 |g */..sh|ort wrap|
|000029a0| 5f 61 72 6f 75 6e 64 3b | 09 09 09 09 2f 2a 20 42 |_around;|..../* B|
|000029b0| 49 47 47 20 77 72 61 70 | 20 61 74 20 65 6e 64 20 |IGG wrap| at end |
|000029c0| 6f 66 20 6c 69 6e 65 20 | 69 66 20 74 72 75 65 20 |of line |if true |
|000029d0| 2a 2f 0d 0d 2f 2a 20 76 | 74 31 30 30 20 42 49 47 |*/../* v|t100 BIG|
|000029e0| 47 20 2a 2f 0d 0d 73 68 | 6f 72 74 20 76 74 6d 6f |G */..sh|ort vtmo|
|000029f0| 64 65 3b 09 09 09 09 09 | 2f 2a 20 42 49 47 47 20 |de;.....|/* BIGG |
|00002a00| 6e 65 77 20 6d 6f 64 65 | 20 68 6f 6c 64 65 72 20 |new mode| holder |
|00002a10| 66 6f 72 20 76 74 31 30 | 30 20 2a 2f 0d 75 6e 73 |for vt10|0 */.uns|
|00002a20| 69 67 6e 65 64 20 73 68 | 6f 72 74 20 2a 20 61 72 |igned sh|ort * ar|
|00002a30| 67 70 3b 09 09 09 2f 2a | 20 42 49 47 47 20 2d 3e |gp;.../*| BIGG ->|
|00002a40| 20 63 75 72 72 65 6e 74 | 20 61 72 67 75 6d 65 6e | current| argumen|
|00002a50| 74 20 2a 2f 0d 0d 2f 2a | 20 33 32 37 30 20 42 49 |t */../*| 3270 BI|
|00002a60| 47 47 20 2a 2f 0d 73 68 | 6f 72 74 20 63 6d 64 73 |GG */.sh|ort cmds|
|00002a70| 74 61 74 65 3b 09 09 09 | 09 09 2f 2a 20 42 49 47 |tate;...|../* BIG|
|00002a80| 47 20 73 74 61 74 65 20 | 6f 66 20 74 68 65 20 65 |G state |of the e|
|00002a90| 6d 75 6c 61 74 6f 72 20 | 2a 2f 0d 75 6e 73 69 67 |mulator |*/.unsig|
|00002aa0| 6e 65 64 20 63 68 61 72 | 20 2a 73 63 72 5f 6d 61 |ned char| *scr_ma|
|00002ab0| 70 3b 20 20 20 20 09 09 | 2f 2a 20 42 49 47 47 20 |p; ..|/* BIGG |
|00002ac0| 73 63 72 65 65 6e 20 6d | 61 70 20 2a 2f 0d 75 6e |screen m|ap */.un|
|00002ad0| 73 69 67 6e 65 64 20 63 | 68 61 72 20 2a 73 6d 61 |signed c|har *sma|
|00002ae0| 70 5f 65 6e 64 3b 20 20 | 20 20 20 20 20 20 2f 2a |p_end; | /*|
|00002af0| 20 42 49 47 47 20 65 6e | 64 20 6f 66 20 6d 61 70 | BIGG en|d of map|
|00002b00| 20 2a 2f 0d 75 6e 73 69 | 67 6e 65 64 20 63 68 61 | */.unsi|gned cha|
|00002b10| 72 20 2a 63 75 72 72 65 | 6e 74 5f 61 74 74 72 3b |r *curre|nt_attr;|
|00002b20| 20 20 20 20 2f 2a 20 42 | 49 47 47 20 70 6f 69 6e | /* B|IGG poin|
|00002b30| 74 65 72 20 74 6f 20 6d | 6f 73 74 20 72 65 63 65 |ter to m|ost rece|
|00002b40| 6e 74 20 61 74 74 72 69 | 62 75 74 65 20 2a 2f 0d |nt attri|bute */.|
|00002b50| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 2a 63 |unsigned| char *c|
|00002b60| 75 72 73 6f 72 5f 70 74 | 72 3b 09 09 2f 2a 20 42 |ursor_pt|r;../* B|
|00002b70| 49 47 47 20 63 75 72 72 | 65 6e 74 20 63 75 72 73 |IGG curr|ent curs|
|00002b80| 6f 72 20 70 6f 73 69 74 | 69 6f 6e 20 69 6e 20 73 |or posit|ion in s|
|00002b90| 63 72 65 65 6e 20 6d 61 | 70 20 2a 2f 0d 75 6e 73 |creen ma|p */.uns|
|00002ba0| 69 67 6e 65 64 20 63 68 | 61 72 20 2a 20 66 69 72 |igned ch|ar * fir|
|00002bb0| 73 74 70 3b 09 09 09 2f | 2a 20 42 49 47 47 20 70 |stp;.../|* BIGG p|
|00002bc0| 74 72 20 74 6f 20 66 69 | 72 73 74 20 64 61 74 61 |tr to fi|rst data|
|00002bd0| 20 62 79 74 65 20 70 72 | 6f 63 65 73 73 65 64 20 | byte pr|ocessed |
|00002be0| 66 6f 72 20 73 65 74 5f | 6d 61 70 20 2a 2f 0d 0d |for set_|map */..|
|00002bf0| 0d 0d 0d 2f 2a 20 65 6e | 64 20 42 49 47 47 20 76 |.../* en|d BIGG v|
|00002c00| 61 72 73 20 2a 2f 0d 0d | 0d 0d 23 69 66 64 65 66 |ars */..|..#ifdef|
|00002c10| 20 4d 41 43 54 43 50 0d | 75 6e 73 69 67 6e 65 64 | MACTCP.|unsigned|
|00002c20| 20 4e 44 45 42 55 47 20 | 3d 20 54 52 55 45 3b 09 | NDEBUG |= TRUE;.|
|00002c30| 09 09 09 2f 2a 20 73 74 | 75 70 69 64 20 64 65 62 |.../* st|upid deb|
|00002c40| 75 67 20 66 6c 61 67 20 | 2a 2f 0d 73 74 72 75 63 |ug flag |*/.struc|
|00002c50| 74 20 6e 65 74 20 74 68 | 69 73 6e 65 74 3b 0d 73 |t net th|isnet;.s|
|00002c60| 74 72 75 63 74 20 6e 65 | 74 20 2a 20 72 6e 65 74 |truct ne|t * rnet|
|00002c70| 3b 0d 73 68 6f 72 74 20 | 6e 6e 72 75 70 3b 09 09 |;.short |nnrup;..|
|00002c80| 09 09 09 09 2f 2a 20 6e | 65 74 77 6f 72 6b 20 6e |..../* n|etwork n|
|00002c90| 6f 74 20 72 65 73 70 6f | 6e 64 69 6e 67 20 64 69 |ot respo|nding di|
|00002ca0| 61 6c 6f 67 20 75 70 20 | 2a 2f 0d 73 74 72 75 63 |alog up |*/.struc|
|00002cb0| 74 20 74 61 73 6b 20 2a | 20 74 6b 5f 63 75 72 3b |t task *| tk_cur;|
|00002cc0| 09 09 09 09 09 2f 2a 20 | 73 75 62 73 20 66 6f 72 |...../* |subs for|
|00002cd0| 20 63 75 72 72 65 6e 74 | 20 74 61 73 6b 20 70 74 | current| task pt|
|00002ce0| 72 20 2a 2f 0d 73 68 6f | 72 74 20 69 70 6c 6f 67 |r */.sho|rt iplog|
|00002cf0| 3b 0d 0d 65 78 74 65 72 | 6e 20 69 6e 74 20 74 63 |;..exter|n int tc|
|00002d00| 70 77 72 5f 75 73 72 28 | 29 3b 09 09 09 2f 2a 20 |pwr_usr(|);.../* |
|00002d10| 74 68 65 73 65 20 61 72 | 65 20 6e 6f 77 20 73 74 |these ar|e now st|
|00002d20| 75 62 73 20 66 6f 72 20 | 63 6f 6d 70 61 74 69 62 |ubs for |compatib|
|00002d30| 69 6c 69 74 79 20 2a 2f | 0d 65 78 74 65 72 6e 20 |ility */|.extern |
|00002d40| 69 6e 74 20 74 63 70 6d | 73 74 5f 72 75 6e 28 29 |int tcpm|st_run()|
|00002d50| 3b 0d 65 78 74 65 72 6e | 20 69 6e 74 20 74 63 70 |;.extern| int tcp|
|00002d60| 6f 70 6e 5f 75 73 72 28 | 29 3b 0d 65 78 74 65 72 |opn_usr(|);.exter|
|00002d70| 6e 20 69 6e 74 20 74 63 | 70 63 6c 73 5f 75 73 72 |n int tc|pcls_usr|
|00002d80| 28 29 3b 0d 65 78 74 65 | 72 6e 20 69 6e 74 20 74 |();.exte|rn int t|
|00002d90| 63 70 74 6d 6f 5f 75 73 | 72 28 29 3b 0d 65 78 74 |cptmo_us|r();.ext|
|00002da0| 65 72 6e 20 69 6e 74 20 | 74 63 70 70 72 5f 64 6f |ern int |tcppr_do|
|00002db0| 74 28 29 3b 0d 65 78 74 | 65 72 6e 20 69 6e 74 20 |t();.ext|ern int |
|00002dc0| 74 63 70 62 66 72 28 29 | 3b 0d 0d 23 65 6c 73 65 |tcpbfr()|;..#else|
|00002dd0| 0d 0d 65 78 74 65 72 6e | 20 69 6e 74 20 74 63 70 |..extern| int tcp|
|00002de0| 77 72 5f 75 73 72 28 29 | 3b 0d 65 78 74 65 72 6e |wr_usr()|;.extern|
|00002df0| 20 69 6e 74 20 74 63 70 | 6d 73 74 5f 72 75 6e 28 | int tcp|mst_run(|
|00002e00| 29 3b 0d 65 78 74 65 72 | 6e 20 69 6e 74 20 74 63 |);.exter|n int tc|
|00002e10| 70 6f 70 6e 5f 75 73 72 | 28 29 3b 0d 65 78 74 65 |popn_usr|();.exte|
|00002e20| 72 6e 20 69 6e 74 20 74 | 63 70 63 6c 73 5f 75 73 |rn int t|cpcls_us|
|00002e30| 72 28 29 3b 0d 65 78 74 | 65 72 6e 20 69 6e 74 20 |r();.ext|ern int |
|00002e40| 74 63 70 74 6d 6f 5f 75 | 73 72 28 29 3b 0d 65 78 |tcptmo_u|sr();.ex|
|00002e50| 74 65 72 6e 20 69 6e 74 | 20 74 63 70 70 72 5f 64 |tern int| tcppr_d|
|00002e60| 6f 74 28 29 3b 0d 65 78 | 74 65 72 6e 20 69 6e 74 |ot();.ex|tern int|
|00002e70| 20 74 63 70 62 66 72 28 | 29 3b 0d 23 65 6e 64 69 | tcpbfr(|);.#endi|
|00002e80| 66 0d 0d 0d 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e |f...unsi|gned lon|
|00002e90| 67 20 74 69 63 6b 73 65 | 72 69 61 6c 3b 09 2f 2a |g tickse|rial;./*|
|00002ea0| 20 6e 65 78 74 20 74 69 | 63 6b 20 63 6f 75 6e 74 | next ti|ck count|
|00002eb0| 20 74 6f 20 73 65 72 76 | 69 63 65 20 73 65 72 69 | to serv|ice seri|
|00002ec0| 61 6c 20 70 6f 72 74 20 | 2a 2f 0d 73 68 6f 72 74 |al port |*/.short|
|00002ed0| 20 73 65 72 69 61 6c 77 | 61 69 74 3b 09 09 09 2f | serialw|ait;.../|
|00002ee0| 2a 20 68 6f 77 20 6c 6f | 6e 67 20 74 68 65 20 73 |* how lo|ng the s|
|00002ef0| 65 72 69 61 6c 20 6d 67 | 72 20 74 68 69 6e 6b 73 |erial mg|r thinks|
|00002f00| 20 77 65 20 73 68 6f 75 | 6c 64 20 77 61 69 74 20 | we shou|ld wait |
|00002f10| 2a 2f 0d 75 6e 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |*/.unsig|ned long|
|00002f20| 20 74 69 63 6b 63 75 72 | 73 6f 72 3b 09 2f 2a 20 | tickcur|sor;./* |
|00002f30| 6e 65 78 74 20 74 69 63 | 6b 20 63 6f 75 6e 74 20 |next tic|k count |
|00002f40| 74 6f 20 73 65 72 76 69 | 63 65 20 63 75 72 73 6f |to servi|ce curso|
|00002f50| 72 20 2a 2f 0d 75 6e 73 | 69 67 6e 65 64 20 6c 6f |r */.uns|igned lo|
|00002f60| 6e 67 20 74 69 63 6b 73 | 74 61 74 73 3b 09 2f 2a |ng ticks|tats;./*|
|00002f70| 20 6e 65 78 74 20 74 69 | 63 6b 20 63 6f 75 6e 74 | next ti|ck count|
|00002f80| 20 74 6f 20 64 69 73 70 | 6c 61 79 20 70 61 63 6b | to disp|lay pack|
|00002f90| 65 74 20 63 6f 75 6e 74 | 65 72 73 20 2a 2f 0d 65 |et count|ers */.e|
|00002fa0| 78 74 65 72 6e 20 73 68 | 6f 72 74 20 6d 6f 64 61 |xtern sh|ort moda|
|00002fb0| 6c 64 69 61 6c 6f 67 3b | 0d 0d 0d 69 6e 74 20 70 |ldialog;|...int p|
|00002fc0| 72 6f 63 5f 74 6f 6b 65 | 6e 28 29 3b 0d 69 6e 74 |roc_toke|n();.int|
|00002fd0| 20 6e 75 6c 6c 70 75 74 | 63 68 61 72 28 29 3b 0d | nullput|char();.|
|00002fe0| 69 6e 74 20 6e 75 6c 6c | 70 75 74 66 6c 75 73 68 |int null|putflush|
|00002ff0| 28 29 3b 0d 0d 73 68 6f | 72 74 20 65 64 72 65 73 |();..sho|rt edres|
|00003000| 65 74 73 65 6c 65 63 74 | 3b 09 09 09 2f 2a 20 72 |etselect|;.../* r|
|00003010| 65 73 65 74 20 73 65 6c | 65 63 74 69 6f 6e 20 61 |eset sel|ection a|
|00003020| 66 74 65 72 20 65 6d 75 | 6c 61 74 6f 72 20 65 64 |fter emu|lator ed|
|00003030| 69 74 20 61 63 74 69 6f | 6e 20 2a 2f 0d 0d 63 68 |it actio|n */..ch|
|00003040| 61 72 20 69 73 64 69 61 | 63 72 69 74 69 63 5b 4e |ar isdia|critic[N|
|00003050| 4f 43 48 41 52 53 5d 3b | 09 2f 2a 20 6d 61 72 6b |OCHARS];|./* mark|
|00003060| 73 20 30 2d 77 69 64 74 | 68 20 64 69 61 63 72 69 |s 0-widt|h diacri|
|00003070| 74 69 63 61 6c 20 63 68 | 61 72 61 63 74 65 72 73 |tical ch|aracters|
|00003080| 20 66 6f 72 20 73 63 72 | 65 65 6e 20 64 72 61 77 | for scr|een draw|
|00003090| 69 6e 67 20 2a 2f 0d 0d | 0d 2f 2a 20 4e 45 57 20 |ing */..|./* NEW |
|000030a0| 43 55 20 54 43 50 2f 20 | 4d 61 63 54 43 50 20 6d |CU TCP/ |MacTCP m|
|000030b0| 65 72 67 65 20 66 65 61 | 74 75 72 65 73 20 2a 2f |erge fea|tures */|
|000030c0| 0d 0d 73 74 72 75 63 74 | 20 77 69 6e 64 73 20 2a |..struct| winds *|
|000030d0| 20 74 63 70 65 6d 64 70 | 3b 09 09 2f 2a 20 74 68 | tcpemdp|;../* th|
|000030e0| 65 20 77 69 6e 64 6f 77 | 20 63 6f 6e 74 65 78 74 |e window| context|
|000030f0| 20 69 6e 20 77 68 69 63 | 68 20 43 55 20 74 63 70 | in whic|h CU tcp|
|00003100| 20 72 75 6e 73 20 2a 2f | 0d 0d 0d 0d 23 69 66 64 | runs */|....#ifd|
|00003110| 65 66 20 4b 45 45 50 41 | 4c 49 56 45 0d 0d 74 69 |ef KEEPA|LIVE..ti|
|00003120| 6d 65 72 20 2a 74 65 6c | 5f 61 79 74 3b 0d 23 64 |mer *tel|_ayt;.#d|
|00003130| 65 66 69 6e 65 20 41 59 | 54 54 20 35 30 30 20 20 |efine AY|TT 500 |
|00003140| 20 09 2f 2a 20 73 65 63 | 6f 6e 64 73 20 62 65 74 | ./* sec|onds bet|
|00003150| 77 65 65 6e 20 61 79 74 | 20 74 69 63 6b 6c 65 73 |ween ayt| tickles|
|00003160| 20 2a 2f 0d 65 78 74 65 | 72 6e 20 69 6e 74 09 09 | */.exte|rn int..|
|00003170| 09 62 65 65 70 5f 61 79 | 74 28 29 3b 0d 0d 23 65 |.beep_ay|t();..#e|
|00003180| 6e 64 69 66 0d 0d 0d 0d | 0d 6d 61 69 6e 28 29 0d |ndif....|.main().|
|00003190| 7b 0d 23 69 66 64 65 66 | 20 4d 41 43 54 43 50 0d |{.#ifdef| MACTCP.|
|000031a0| 09 72 6e 65 74 20 3d 20 | 26 74 68 69 73 6e 65 74 |.rnet = |&thisnet|
|000031b0| 3b 0d 23 65 6c 73 65 0d | 23 61 73 6d 0d 09 70 75 |;.#else.|#asm..pu|
|000031c0| 62 6c 69 63 20 5f 61 70 | 70 73 74 61 6b 0d 09 6d |blic _ap|pstak..m|
|000031d0| 6f 76 65 2e 6c 20 61 36 | 2c 5f 61 70 70 73 74 61 |ove.l a6|,_appsta|
|000031e0| 6b 20 3b 09 2f 2a 20 73 | 65 74 20 74 68 65 20 73 |k ;./* s|et the s|
|000031f0| 74 61 63 6b 20 62 6f 74 | 74 6f 6d 20 70 74 72 20 |tack bot|tom ptr |
|00003200| 74 6f 20 63 6f 70 79 20 | 74 68 65 20 77 68 6f 6c |to copy |the whol|
|00003210| 65 20 73 74 61 63 6b 20 | 2a 2f 0d 23 65 6e 64 61 |e stack |*/.#enda|
|00003220| 73 6d 0d 23 65 6e 64 69 | 66 0d 0d 09 41 35 69 6e |sm.#endi|f...A5in|
|00003230| 69 74 28 29 3b 09 09 09 | 09 09 2f 2a 20 73 61 76 |it();...|../* sav|
|00003240| 65 20 61 35 20 2a 2f 0d | 09 6d 61 63 69 6e 69 74 |e a5 */.|.macinit|
|00003250| 28 28 6c 6f 6e 67 29 20 | 28 37 35 4c 20 2a 20 31 |((long) |(75L * 1|
|00003260| 30 32 34 4c 29 29 3b 0d | 09 73 65 74 75 70 61 70 |024L));.|.setupap|
|00003270| 70 6c 65 6d 65 6e 75 28 | 29 3b 09 09 2f 2a 20 73 |plemenu(|);../* s|
|00003280| 6f 20 77 65 20 63 61 6e | 20 63 68 6b 20 66 6f 72 |o we can| chk for|
|00003290| 20 6d 75 6c 74 69 66 69 | 6e 64 65 72 20 2a 2f 0d | multifi|nder */.|
|000032a0| 09 69 66 20 28 63 68 6b | 6d 75 6c 74 69 66 69 6e |.if (chk|multifin|
|000032b0| 64 65 72 28 29 29 20 7b | 0d 09 09 45 76 65 6e 74 |der()) {|...Event|
|000032c0| 52 65 63 6f 72 64 20 6d | 79 45 76 65 6e 74 3b 0d |Record m|yEvent;.|
|000032d0| 09 09 0d 09 09 2f 2a 20 | 65 76 65 6e 74 61 76 61 |...../* |eventava|
|000032e0| 69 6c 20 77 69 6c 6c 20 | 70 75 74 20 74 68 65 73 |il will |put thes|
|000032f0| 65 20 62 61 63 6b 20 6f | 6e 20 74 68 65 20 71 75 |e back o|n the qu|
|00003300| 65 75 65 2c 20 62 75 74 | 20 6e 6f 74 20 6a 75 73 |eue, but| not jus|
|00003310| 74 20 61 6e 79 20 65 76 | 65 6e 74 21 20 2a 2f 0d |t any ev|ent! */.|
|00003320| 09 09 45 76 65 6e 74 41 | 76 61 69 6c 28 6b 65 79 |..EventA|vail(key|
|00003330| 44 6f 77 6e 4d 61 73 6b | 2c 20 26 6d 79 45 76 65 |DownMask|, &myEve|
|00003340| 6e 74 29 3b 0d 09 09 45 | 76 65 6e 74 41 76 61 69 |nt);...E|ventAvai|
|00003350| 6c 28 6b 65 79 44 6f 77 | 6e 4d 61 73 6b 2c 20 26 |l(keyDow|nMask, &|
|00003360| 6d 79 45 76 65 6e 74 29 | 3b 0d 09 09 45 76 65 6e |myEvent)|;...Even|
|00003370| 74 41 76 61 69 6c 28 6b | 65 79 44 6f 77 6e 4d 61 |tAvail(k|eyDownMa|
|00003380| 73 6b 2c 20 26 6d 79 45 | 76 65 6e 74 29 3b 0d 09 |sk, &myE|vent);..|
|00003390| 09 09 2f 2a 20 74 68 65 | 73 65 20 63 61 6c 6c 73 |../* the|se calls|
|000033a0| 20 77 69 6c 6c 20 70 72 | 6f 6d 70 74 20 74 68 65 | will pr|ompt the|
|000033b0| 20 4d 75 6c 74 69 46 69 | 6e 64 65 72 20 74 6f 20 | MultiFi|nder to |
|000033c0| 64 69 73 70 6c 61 79 20 | 6f 75 72 20 73 74 61 72 |display |our star|
|000033d0| 74 75 70 20 73 63 72 65 | 65 6e 20 2a 2f 0d 09 7d |tup scre|en */..}|
|000033e0| 0d 09 69 66 20 28 21 73 | 63 72 69 6e 69 74 28 29 |..if (!s|crinit()|
|000033f0| 29 20 7b 0d 09 09 65 72 | 72 6f 72 28 22 43 61 6e |) {...er|ror("Can|
|00003400| 27 74 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 73 63 |'t initi|alize sc|
|00003410| 72 65 65 6e 22 29 3b 0d | 09 09 63 75 5f 65 78 69 |reen");.|..cu_exi|
|00003420| 74 28 2d 31 29 3b 0d 09 | 7d 0d 0d 09 74 6e 5f 69 |t(-1);..|}...tn_i|
|00003430| 6e 69 74 28 29 3b 0d 09 | 69 62 6d 5f 69 6e 69 74 |nit();..|ibm_init|
|00003440| 28 29 3b 0d 09 73 65 74 | 75 70 6d 65 6e 75 28 29 |();..set|upmenu()|
|00003450| 3b 0d 0d 09 53 65 74 45 | 76 65 6e 74 4d 61 73 6b |;...SetE|ventMask|
|00003460| 28 65 76 65 72 79 45 76 | 65 6e 74 29 3b 0d 09 09 |(everyEv|ent);...|
|00003470| 2f 2a 20 66 69 78 20 65 | 76 65 6e 74 20 6d 61 73 |/* fix e|vent mas|
|00003480| 6b 20 66 6f 72 20 61 75 | 74 6f 6b 65 79 63 6f 6d |k for au|tokeycom|
|00003490| 6d 61 6e 64 2d 2d 6d 61 | 79 20 63 61 75 73 65 20 |mand--ma|y cause |
|000034a0| 66 75 6c 6c 20 65 76 65 | 6e 74 20 71 75 65 75 65 |full eve|nt queue|
|000034b0| 21 20 2a 2f 0d 0d 23 69 | 66 64 65 66 20 44 4f 48 |! */..#i|fdef DOH|
|000034c0| 59 43 0d 09 68 79 63 5f | 69 6e 69 74 28 29 3b 0d |YC..hyc_|init();.|
|000034d0| 23 65 6e 64 69 66 0d 0d | 2f 2a 20 61 6e 64 20 73 |#endif..|/* and s|
|000034e0| 6f 6d 65 20 6f 70 74 69 | 6f 6e 61 6c 20 73 74 75 |ome opti|onal stu|
|000034f0| 66 66 20 2a 2f 0d 0d 23 | 69 66 64 65 66 20 4b 45 |ff */..#|ifdef KE|
|00003500| 45 50 41 4c 49 56 45 0d | 09 69 66 20 28 28 74 65 |EPALIVE.|.if ((te|
|00003510| 6c 5f 61 79 74 20 3d 20 | 74 6d 5f 61 6c 6c 6f 63 |l_ayt = |tm_alloc|
|00003520| 28 29 29 20 3d 3d 20 4e | 55 4c 4c 29 20 7b 0d 09 |()) == N|ULL) {..|
|00003530| 09 65 72 72 6f 72 28 22 | 55 6e 61 62 6c 65 20 74 |.error("|Unable t|
|00003540| 6f 20 61 6c 6c 6f 63 61 | 74 65 20 74 65 6c 6e 65 |o alloca|te telne|
|00003550| 74 20 61 79 74 20 74 69 | 6d 65 72 22 29 3b 0d 09 |t ayt ti|mer");..|
|00003560| 09 63 75 5f 65 78 69 74 | 28 2d 31 29 3b 0d 09 7d |.cu_exit|(-1);..}|
|00003570| 0d 09 74 6d 5f 73 65 74 | 28 41 59 54 54 2c 20 62 |..tm_set|(AYTT, b|
|00003580| 65 65 70 5f 61 79 74 2c | 20 4e 55 4c 4c 2c 20 74 |eep_ayt,| NULL, t|
|00003590| 65 6c 5f 61 79 74 29 3b | 0d 23 65 6e 64 69 66 0d |el_ayt);|.#endif.|
|000035a0| 0d 23 69 66 64 65 66 20 | 4d 41 43 54 43 50 0d 09 |.#ifdef |MACTCP..|
|000035b0| 74 6b 5f 63 75 72 20 3d | 20 32 4c 3b 09 09 09 09 |tk_cur =| 2L;....|
|000035c0| 2f 2a 20 6e 65 65 64 73 | 20 74 6f 20 62 65 20 6e |/* needs| to be n|
|000035d0| 6f 6e 7a 65 72 6f 20 73 | 6f 20 74 6b 5f 79 69 65 |onzero s|o tk_yie|
|000035e0| 6c 64 20 77 69 6c 6c 20 | 62 65 20 63 61 6c 6c 65 |ld will |be calle|
|000035f0| 64 20 2a 2f 0d 09 74 6d | 5f 69 6e 69 74 28 29 3b |d */..tm|_init();|
|00003600| 0d 23 65 6c 73 65 0d 09 | 2f 2a 20 69 6e 69 74 69 |.#else..|/* initi|
|00003610| 61 6c 69 7a 65 20 74 61 | 73 6b 69 6e 67 20 2a 2f |alize ta|sking */|
|00003620| 0d 09 74 6b 5f 69 6e 69 | 74 28 31 30 30 30 30 29 |..tk_ini|t(10000)|
|00003630| 3b 09 09 09 09 2f 2a 20 | 73 69 7a 65 20 6f 66 20 |;..../* |size of |
|00003640| 74 68 65 20 6d 61 69 6e | 20 74 61 73 6b 27 73 20 |the main| task's |
|00003650| 73 74 61 63 6b 20 2a 2f | 0d 09 74 6d 5f 69 6e 69 |stack */|..tm_ini|
|00003660| 74 28 29 3b 0d 23 65 6e | 64 69 66 0d 0d 09 2f 2a |t();.#en|dif.../*|
|00003670| 20 6f 70 65 6e 20 64 6f | 63 75 6d 65 6e 74 20 66 | open do|cument f|
|00003680| 69 6c 65 73 20 26 20 64 | 6f 20 63 6f 6e 66 69 67 |iles & d|o config|
|00003690| 75 72 61 74 69 6f 6e 20 | 20 2a 2f 0d 09 6f 70 65 |uration | */..ope|
|000036a0| 6e 6c 61 75 6e 63 68 72 | 65 73 28 29 3b 09 0d 09 |nlaunchr|es();...|
|000036b0| 0d 09 66 69 6c 6c 77 69 | 6e 64 63 6c 6f 73 65 28 |..fillwi|ndclose(|
|000036c0| 29 3b 0d 09 09 2f 2a 20 | 63 6c 6f 73 65 20 74 68 |);.../* |close th|
|000036d0| 65 20 63 6f 70 79 72 69 | 67 68 74 20 77 69 6e 64 |e copyri|ght wind|
|000036e0| 6f 77 20 69 66 20 69 74 | 27 73 20 75 70 20 2a 2f |ow if it|'s up */|
|000036f0| 0d 0d 23 69 66 64 65 66 | 20 54 46 54 50 53 45 52 |..#ifdef| TFTPSER|
|00003700| 56 45 0d 09 2f 2a 20 73 | 74 61 72 74 20 74 68 65 |VE../* s|tart the|
|00003710| 20 74 66 74 70 20 73 65 | 72 76 65 72 20 61 6e 64 | tftp se|rver and|
|00003720| 20 74 75 72 6e 20 69 74 | 20 6f 6e 20 69 66 20 63 | turn it| on if c|
|00003730| 6f 6e 66 69 67 75 72 65 | 64 20 6f 6e 20 2a 2f 0d |onfigure|d on */.|
|00003740| 09 69 66 20 28 74 66 74 | 70 73 65 72 76 65 20 3d |.if (tft|pserve =|
|00003750| 3d 20 54 46 59 45 53 29 | 20 7b 0d 09 09 74 66 73 |= TFYES)| {...tfs|
|00003760| 5f 6f 6e 28 29 3b 0d 09 | 7d 0d 23 65 6e 64 69 66 |_on();..|}.#endif|
|00003770| 0d 09 2f 2a 20 61 6e 64 | 20 6e 6f 77 20 77 65 20 |../* and| now we |
|00003780| 72 75 6e 20 2e 2e 2e 20 | 2a 2f 0d 09 77 68 69 6c |run ... |*/..whil|
|00003790| 65 20 28 54 52 55 45 29 | 20 7b 0d 09 09 0d 09 09 |e (TRUE)| {......|
|000037a0| 75 73 65 72 5f 61 63 74 | 28 29 3b 09 09 09 2f 2a |user_act|();.../*|
|000037b0| 20 75 73 65 72 20 69 6e | 70 75 74 2d 2d 70 72 6f | user in|put--pro|
|000037c0| 63 65 73 73 20 6d 61 63 | 20 65 76 65 6e 74 73 20 |cess mac| events |
|000037d0| 2a 2f 0d 0d 09 09 74 6f | 6b 65 6e 5f 73 65 72 76 |*/....to|ken_serv|
|000037e0| 69 63 65 28 29 3b 09 2f | 2a 20 75 73 65 72 20 6f |ice();./|* user o|
|000037f0| 75 74 70 75 74 2d 2d 68 | 61 6e 64 6c 65 20 61 63 |utput--h|andle ac|
|00003800| 74 69 6f 6e 73 20 77 61 | 69 74 69 6e 67 20 6f 6e |tions wa|iting on|
|00003810| 20 74 68 65 20 71 75 65 | 75 65 20 2a 2f 0d 09 09 | the que|ue */...|
|00003820| 69 6f 5f 73 65 72 76 69 | 63 65 28 29 3b 09 09 2f |io_servi|ce();../|
|00003830| 2a 20 66 6f 72 20 6d 65 | 72 67 65 64 20 4d 61 63 |* for me|rged Mac|
|00003840| 54 43 50 2f 43 55 54 43 | 50 20 2a 2f 0d 09 09 73 |TCP/CUTC|P */...s|
|00003850| 63 72 65 65 6e 5f 73 65 | 72 76 69 63 65 28 29 3b |creen_se|rvice();|
|00003860| 09 2f 2a 20 75 70 64 61 | 74 65 20 73 63 72 65 65 |./* upda|te scree|
|00003870| 6e 20 2a 2f 0d 0d 23 69 | 66 64 65 66 20 44 55 41 |n */..#i|fdef DUA|
|00003880| 4c 54 43 50 0d 09 09 74 | 6b 5f 79 69 65 6c 64 28 |LTCP...t|k_yield(|
|00003890| 29 3b 09 09 09 2f 2a 20 | 74 61 73 6b 20 79 69 65 |);.../* |task yie|
|000038a0| 6c 64 20 66 6f 72 20 43 | 6f 72 6e 65 6c 6c 20 54 |ld for C|ornell T|
|000038b0| 43 50 20 2a 2f 0d 23 65 | 6c 73 65 0d 09 09 69 66 |CP */.#e|lse...if|
|000038c0| 20 28 74 69 6d 65 72 74 | 72 69 70 70 65 64 29 0d | (timert|ripped).|
|000038d0| 09 09 09 74 6d 5f 6d 61 | 69 6e 28 29 3b 09 09 2f |...tm_ma|in();../|
|000038e0| 2a 20 73 65 72 76 69 63 | 65 20 74 69 6d 65 72 20 |* servic|e timer |
|000038f0| 2a 2f 0d 23 65 6e 64 69 | 66 0d 09 7d 0d 09 2f 2a |*/.#endi|f..}../*|
|00003900| 20 6e 6f 74 20 72 65 61 | 63 68 65 64 20 2a 2f 0d | not rea|ched */.|
|00003910| 09 63 75 5f 65 78 69 74 | 28 30 29 3b 0d 7d 0d 0d |.cu_exit|(0);.}..|
|00003920| 0d 2f 2a 20 20 73 6f 6d | 65 20 74 72 69 76 69 61 |./* som|e trivia|
|00003930| 6c 20 73 75 62 72 6f 75 | 74 69 6e 65 73 20 74 68 |l subrou|tines th|
|00003940| 61 74 20 69 6e 74 65 72 | 61 63 74 20 77 69 74 68 |at inter|act with|
|00003950| 20 6c 6f 77 65 72 20 6c | 65 76 65 6c 20 63 6f 64 | lower l|evel cod|
|00003960| 65 20 20 2a 2f 0d 0d 23 | 69 66 64 65 66 20 4b 45 |e */..#|ifdef KE|
|00003970| 45 50 41 4c 49 56 45 0d | 0d 2f 2a 20 20 73 65 74 |EPALIVE.|./* set|
|00003980| 20 61 20 66 6c 61 67 20 | 77 68 65 6e 20 74 69 6d | a flag |when tim|
|00003990| 65 72 20 70 6f 70 73 20 | 28 73 68 6f 75 6c 64 20 |er pops |(should |
|000039a0| 6a 75 73 74 20 73 65 6e | 64 20 61 6e 20 41 59 54 |just sen|d an AYT|
|000039b0| 21 29 20 2a 2f 0d 0d 62 | 65 65 70 5f 61 79 74 28 |!) */..b|eep_ayt(|
|000039c0| 29 20 0d 7b 20 0d 09 65 | 6d 64 70 2d 3e 65 76 65 |) .{ ..e|mdp->eve|
|000039d0| 6e 74 5f 72 65 67 20 7c | 3d 20 54 49 43 4b 4c 45 |nt_reg ||= TICKLE|
|000039e0| 3b 0d 7d 0d 0d 23 65 6e | 64 69 66 0d 0d 2f 2a 20 |;.}..#en|dif../* |
|000039f0| 66 69 67 75 72 65 20 6f | 75 74 20 61 20 6e 65 61 |figure o|ut a nea|
|00003a00| 74 20 74 65 6c 6e 65 74 | 20 73 6f 63 6b 65 74 20 |t telnet| socket |
|00003a10| 2a 2f 0d 0d 74 6e 5f 73 | 6f 63 6b 28 29 20 0d 7b |*/..tn_s|ock() .{|
|00003a20| 0d 09 6c 6f 6e 67 20 74 | 65 6d 70 3b 0d 0d 09 47 |..long t|emp;...G|
|00003a30| 65 74 44 61 74 65 54 69 | 6d 65 28 26 74 65 6d 70 |etDateTi|me(&temp|
|00003a40| 29 3b 0d 09 74 65 6d 70 | 20 26 3d 20 30 78 66 66 |);..temp| &= 0xff|
|00003a50| 66 66 3b 20 0d 09 69 66 | 20 28 74 65 6d 70 20 3c |ff; ..if| (temp <|
|00003a60| 20 31 30 30 30 29 20 0d | 09 09 74 65 6d 70 20 2b | 1000) .|..temp +|
|00003a70| 3d 20 31 30 30 30 3b 0d | 09 72 65 74 75 72 6e 28 |= 1000;.|.return(|
|00003a80| 28 75 6e 73 69 67 6e 65 | 64 29 20 74 65 6d 70 29 |(unsigne|d) temp)|
|00003a90| 3b 0d 7d 0d 0d 0d 2f 2a | 20 63 61 6c 6c 65 64 20 |;.}.../*| called |
|00003aa0| 77 68 65 6e 20 61 20 63 | 6f 6e 6e 65 63 74 69 6f |when a c|onnectio|
|00003ab0| 6e 20 69 73 20 6f 70 65 | 6e 65 64 20 74 6f 20 70 |n is ope|ned to p|
|00003ac0| 65 72 66 6f 72 6d 20 55 | 49 20 74 61 73 6b 73 20 |erform U|I tasks |
|00003ad0| 2a 2f 0d 0d 6f 70 6e 5f | 75 73 72 28 29 20 0d 7b |*/..opn_|usr() .{|
|00003ae0| 0d 09 65 6d 64 70 2d 3e | 63 6f 6e 6e 6f 70 65 6e |..emdp->|connopen|
|00003af0| 20 3d 20 54 52 55 45 3b | 0d 0d 09 65 6d 64 70 2d | = TRUE;|...emdp-|
|00003b00| 3e 68 79 63 63 6f 6e 6e | 77 61 69 74 20 3d 20 46 |>hycconn|wait = F|
|00003b10| 41 4c 53 45 3b 0d 09 69 | 66 20 28 65 6d 64 70 2d |ALSE;..i|f (emdp-|
|00003b20| 3e 65 6d 77 69 6e 64 6f | 77 20 21 3d 20 4e 55 4c |>emwindo|w != NUL|
|00003b30| 4c 29 20 7b 0d 09 09 2f | 2a 20 75 70 64 61 74 65 |L) {.../|* update|
|00003b40| 20 74 68 65 20 6d 65 6e | 75 73 3b 20 66 69 72 73 | the men|us; firs|
|00003b50| 74 20 74 68 65 20 77 69 | 6e 64 6f 77 20 6d 65 6e |t the wi|ndow men|
|00003b60| 75 20 6d 61 72 6b 20 2a | 2f 0d 09 09 69 66 20 28 |u mark *|/...if (|
|00003b70| 65 6d 64 70 2d 3e 63 6f | 6e 6e 74 79 70 65 20 3d |emdp->co|nntype =|
|00003b80| 3d 20 43 4f 4e 4e 5f 4d | 41 43 54 43 50 20 7c 7c |= CONN_M|ACTCP |||
|00003b90| 20 65 6d 64 70 2d 3e 63 | 6f 6e 6e 74 79 70 65 20 | emdp->c|onntype |
|00003ba0| 3d 3d 20 43 4f 4e 4e 5f | 43 55 54 43 50 29 20 7b |== CONN_|CUTCP) {|
|00003bb0| 0d 09 09 09 77 69 6e 64 | 6d 65 6e 75 6d 61 72 6b |....wind|menumark|
|00003bc0| 28 65 6d 64 70 2c 20 30 | 78 41 35 29 3b 09 09 2f |(emdp, 0|xA5);../|
|00003bd0| 2a 20 73 65 74 20 61 20 | a5 20 6d 61 72 6b 20 2a |* set a |. mark *|
|00003be0| 2f 0d 09 09 7d 0d 09 09 | 65 6c 73 65 20 69 66 20 |/...}...|else if |
|00003bf0| 28 65 6d 64 70 2d 3e 63 | 6f 6e 6e 74 79 70 65 20 |(emdp->c|onntype |
|00003c00| 3d 3d 20 43 4f 4e 4e 5f | 53 45 52 44 29 20 7b 0d |== CONN_|SERD) {.|
|00003c10| 09 09 09 77 69 6e 64 6d | 65 6e 75 6d 61 72 6b 28 |...windm|enumark(|
|00003c20| 65 6d 64 70 2c 20 65 6d | 64 70 2d 3e 75 73 65 62 |emdp, em|dp->useb|
|00003c30| 70 6f 72 74 20 3f 20 27 | 2d 27 20 3a 20 27 2b 27 |port ? '|-' : '+'|
|00003c40| 29 3b 09 09 0d 09 09 09 | 09 2f 2a 20 73 65 74 20 |);......|./* set |
|00003c50| 61 20 6d 61 72 6b 20 6f | 6e 20 74 68 65 20 6d 65 |a mark o|n the me|
|00003c60| 6e 75 20 69 74 65 6d 20 | 2b 20 66 6f 72 20 6d 6f |nu item |+ for mo|
|00003c70| 64 65 6d 20 70 6f 72 74 | 2c 0d 09 09 09 09 09 2d |dem port|,......-|
|00003c80| 20 66 6f 72 20 70 72 69 | 6e 74 65 72 20 70 6f 72 | for pri|nter por|
|00003c90| 74 20 2a 2f 0d 09 09 7d | 0d 09 09 65 6c 73 65 20 |t */...}|...else |
|00003ca0| 69 66 20 28 65 6d 64 70 | 2d 3e 63 6f 6e 6e 74 79 |if (emdp|->connty|
|00003cb0| 70 65 20 3d 3d 20 43 4f | 4e 4e 5f 43 4f 4d 4d 4d |pe == CO|NN_COMMM|
|00003cc0| 47 52 29 20 7b 0d 09 09 | 09 77 69 6e 64 6d 65 6e |GR) {...|.windmen|
|00003cd0| 75 6d 61 72 6b 28 65 6d | 64 70 2c 20 30 78 41 35 |umark(em|dp, 0xA5|
|00003ce0| 29 3b 09 09 2f 2a 20 73 | 65 74 20 61 20 a5 20 6d |);../* s|et a . m|
|00003cf0| 61 72 6b 20 2a 2f 0d 09 | 09 7d 0d 09 09 0d 09 09 |ark */..|.}......|
|00003d00| 69 66 20 28 6b 65 79 64 | 70 20 3d 3d 20 4e 55 4c |if (keyd|p == NUL|
|00003d10| 4c 20 7c 7c 20 65 6d 77 | 69 6e 64 6f 77 20 3d 3d |L || emw|indow ==|
|00003d20| 20 6b 65 79 64 70 2d 3e | 65 6d 77 69 6e 64 6f 77 | keydp->|emwindow|
|00003d30| 29 20 7b 0d 09 09 09 69 | 66 20 28 73 65 74 6d 73 |) {....i|f (setms|
|00003d40| 65 73 73 69 6f 6e 28 65 | 6d 64 70 29 20 7c 7c 20 |ession(e|mdp) || |
|00003d50| 73 65 74 6d 65 6e 75 63 | 6f 6e 6e 28 65 6d 64 70 |setmenuc|onn(emdp|
|00003d60| 29 29 0d 09 09 09 09 44 | 72 61 77 4d 65 6e 75 42 |)).....D|rawMenuB|
|00003d70| 61 72 28 29 3b 0d 09 09 | 7d 0d 09 09 72 65 73 74 |ar();...|}...rest|
|00003d80| 6f 72 65 32 35 28 29 3b | 09 2f 2a 20 61 6c 6c 6f |ore25();|./* allo|
|00003d90| 77 20 63 6f 6e 74 72 6f | 6c 73 20 74 6f 20 62 65 |w contro|ls to be|
|00003da0| 20 64 72 61 77 6e 20 2a | 2f 0d 09 7d 0d 7d 0d 0d | drawn *|/..}.}..|
|00003db0| 0d 2f 2a 20 63 61 6c 6c | 65 64 20 77 68 65 6e 20 |./* call|ed when |
|00003dc0| 61 20 73 65 73 73 69 6f | 6e 20 69 73 20 63 6c 6f |a sessio|n is clo|
|00003dd0| 73 65 64 2c 20 77 69 6e | 64 6f 77 20 6d 65 6e 75 |sed, win|dow menu|
|00003de0| 20 6d 61 72 6b 20 61 6c | 72 65 61 64 79 20 73 65 | mark al|ready se|
|00003df0| 74 20 2a 2f 0d 2f 2a 20 | 57 41 52 4e 49 4e 47 3a |t */./* |WARNING:|
|00003e00| 20 74 77 70 20 6d 61 79 | 20 64 69 73 61 70 70 65 | twp may| disappe|
|00003e10| 61 72 2c 20 65 6d 64 70 | 20 6d 61 79 20 63 68 61 |ar, emdp| may cha|
|00003e20| 6e 67 65 21 20 2a 2f 0d | 0d 0d 63 6c 73 5f 75 73 |nge! */.|..cls_us|
|00003e30| 72 28 29 20 0d 7b 0d 09 | 69 66 20 28 21 65 6d 64 |r() .{..|if (!emd|
|00003e40| 70 2d 3e 63 6f 6e 6e 6f | 70 65 6e 29 0d 09 09 72 |p->conno|pen)...r|
|00003e50| 65 74 75 72 6e 3b 0d 09 | 09 0d 09 69 66 20 28 65 |eturn;..|...if (e|
|00003e60| 6d 64 70 2d 3e 68 79 63 | 61 63 74 69 76 65 29 0d |mdp->hyc|active).|
|00003e70| 09 09 65 6d 64 70 2d 3e | 68 79 63 63 6f 6e 6e 77 |..emdp->|hycconnw|
|00003e80| 61 69 74 20 3d 20 46 41 | 4c 53 45 3b 0d 0d 09 65 |ait = FA|LSE;...e|
|00003e90| 6d 64 70 2d 3e 63 6f 6e | 6e 6f 70 65 6e 20 3d 20 |mdp->con|nopen = |
|00003ea0| 46 41 4c 53 45 3b 0d 09 | 65 6d 64 70 2d 3e 74 65 |FALSE;..|emdp->te|
|00003eb0| 72 6d 73 65 74 20 3d 20 | 46 41 4c 53 45 3b 09 09 |rmset = |FALSE;..|
|00003ec0| 09 2f 2a 20 6e 6f 20 74 | 65 72 6d 69 6e 61 6c 20 |./* no t|erminal |
|00003ed0| 74 79 70 65 20 73 65 6c | 65 63 74 65 64 20 2a 2f |type sel|ected */|
|00003ee0| 0d 09 65 6d 64 70 2d 3e | 65 76 65 6e 74 5f 72 65 |..emdp->|event_re|
|00003ef0| 67 20 3d 20 30 3b 0d 09 | 65 6d 64 70 2d 3e 69 6e |g = 0;..|emdp->in|
|00003f00| 5f 63 6e 74 20 3d 20 30 | 3b 0d 09 65 6d 64 70 2d |_cnt = 0|;..emdp-|
|00003f10| 3e 6f 75 74 5f 63 6e 74 | 20 3d 20 30 3b 0d 09 66 |>out_cnt| = 0;..f|
|00003f20| 6c 75 73 68 61 63 74 69 | 6f 6e 73 28 65 6d 64 70 |lushacti|ons(emdp|
|00003f30| 29 3b 0d 09 0d 09 73 61 | 76 65 73 63 72 65 65 6e |);....sa|vescreen|
|00003f40| 28 29 3b 09 09 09 2f 2a | 20 69 6e 20 63 61 73 65 |();.../*| in case|
|00003f50| 20 77 65 27 72 65 20 6c | 6f 67 67 69 6e 67 20 74 | we're l|ogging t|
|00003f60| 68 65 20 73 65 73 73 69 | 6f 6e 20 2a 2f 0d 09 6c |he sessi|on */..l|
|00003f70| 6f 67 63 6c 6f 73 65 28 | 29 3b 0d 09 0d 09 69 66 |ogclose(|);....if|
|00003f80| 20 28 65 6d 64 70 2d 3e | 65 6d 77 69 6e 64 6f 77 | (emdp->|emwindow|
|00003f90| 20 21 3d 20 4e 55 4c 4c | 29 20 7b 0d 09 09 0d 09 | != NULL|) {.....|
|00003fa0| 09 69 66 20 28 21 6c 69 | 6e 65 32 35 6f 6e 28 65 |.if (!li|ne25on(e|
|00003fb0| 6d 64 70 29 29 0d 09 09 | 09 70 72 32 35 28 30 2c |mdp))...|.pr25(0,|
|00003fc0| 20 6e 6f 73 65 73 73 69 | 6f 6e 73 74 72 29 3b 0d | nosessi|onstr);.|
|00003fd0| 09 09 73 74 61 74 75 73 | 5f 69 6e 66 6f 28 29 3b |..status|_info();|
|00003fe0| 0d 09 09 2f 2a 20 70 72 | 65 74 74 79 77 69 6e 64 |.../* pr|ettywind|
|00003ff0| 28 54 52 55 45 29 3b 20 | 0d 09 09 09 72 65 73 75 |(TRUE); |....resu|
|00004000| 6c 74 73 20 69 6e 20 63 | 6c 65 61 72 65 64 20 61 |lts in c|leared a|
|00004010| 72 65 61 20 77 68 65 6e | 20 63 6f 6c 6f 72 20 69 |rea when| color i|
|00004020| 73 20 6f 6e 20 2a 2f 0d | 09 09 69 66 20 28 6b 65 |s on */.|..if (ke|
|00004030| 79 64 70 20 3d 3d 20 4e | 55 4c 4c 20 7c 7c 20 65 |ydp == N|ULL || e|
|00004040| 6d 64 70 2d 3e 65 6d 77 | 69 6e 64 6f 77 20 3d 3d |mdp->emw|indow ==|
|00004050| 20 6b 65 79 64 70 2d 3e | 65 6d 77 69 6e 64 6f 77 | keydp->|emwindow|
|00004060| 29 20 7b 0d 09 09 09 2f | 2a 20 66 69 78 20 6d 65 |) {..../|* fix me|
|00004070| 6e 75 20 74 6f 20 72 65 | 66 6c 65 63 74 20 73 74 |nu to re|flect st|
|00004080| 61 74 75 73 20 2a 2f 0d | 09 09 09 69 66 20 28 73 |atus */.|...if (s|
|00004090| 65 74 6d 73 65 73 73 69 | 6f 6e 28 65 6d 64 70 29 |etmsessi|on(emdp)|
|000040a0| 20 7c 7c 20 73 65 74 6d | 65 6e 75 63 6f 6e 6e 28 | || setm|enuconn(|
|000040b0| 65 6d 64 70 29 29 0d 09 | 09 09 09 44 72 61 77 4d |emdp))..|...DrawM|
|000040c0| 65 6e 75 42 61 72 28 29 | 3b 0d 09 09 7d 0d 09 09 |enuBar()|;...}...|
|000040d0| 69 66 20 28 65 6d 64 70 | 2d 3e 64 69 73 70 6f 73 |if (emdp|->dispos|
|000040e0| 65 6f 6e 63 6c 6f 73 65 | 29 20 7b 0d 09 09 09 2f |eonclose|) {..../|
|000040f0| 2a 20 6b 69 6c 6c 20 77 | 69 6e 64 6f 77 20 77 68 |* kill w|indow wh|
|00004100| 65 6e 20 63 6c 6f 73 65 | 64 20 2a 2f 0d 09 09 09 |en close|d */....|
|00004110| 71 75 65 72 79 63 6c 6f | 73 65 77 69 6e 64 28 65 |queryclo|sewind(e|
|00004120| 6d 64 70 29 3b 0d 09 09 | 7d 0d 09 7d 0d 7d 0d 0d |mdp);...|}..}.}..|
|00004130| 74 63 70 6d 73 74 5f 72 | 75 6e 28 29 0d 7b 0d 7d |tcpmst_r|un().{.}|
|00004140| 0d 0d 0d 2f 2a 20 63 61 | 6c 6c 20 77 72 5f 75 73 |.../* ca|ll wr_us|
|00004150| 72 20 61 66 74 65 72 20 | 67 65 74 74 69 6e 67 20 |r after |getting |
|00004160| 74 68 65 20 63 6f 6e 74 | 65 78 74 20 2a 2f 0d 0d |the cont|ext */..|
|00004170| 74 63 70 77 72 5f 75 73 | 72 28 62 75 66 2c 20 6c |tcpwr_us|r(buf, l|
|00004180| 65 6e 2c 20 75 72 67 29 | 0d 75 6e 73 69 67 6e 65 |en, urg)|.unsigne|
|00004190| 64 20 63 68 61 72 20 2a | 62 75 66 3b 0d 69 6e 74 |d char *|buf;.int|
|000041a0| 20 6c 65 6e 3b 0d 69 6e | 74 20 75 72 67 3b 20 0d | len;.in|t urg; .|
|000041b0| 7b 0d 09 73 74 72 75 63 | 74 20 77 69 6e 64 73 20 |{..struc|t winds |
|000041c0| 2a 20 6f 65 6d 64 70 3b | 0d 09 0d 09 6f 65 6d 64 |* oemdp;|....oemd|
|000041d0| 70 20 3d 20 65 6d 64 70 | 3b 0d 09 67 65 74 63 6f |p = emdp|;..getco|
|000041e0| 6e 74 65 78 74 28 74 63 | 70 65 6d 64 70 29 3b 0d |ntext(tc|pemdp);.|
|000041f0| 09 77 72 5f 75 73 72 28 | 62 75 66 2c 20 6c 65 6e |.wr_usr(|buf, len|
|00004200| 2c 20 75 72 67 29 3b 0d | 09 0d 09 69 66 20 28 65 |, urg);.|...if (e|
|00004210| 6d 64 70 20 3d 3d 20 6f | 65 6d 64 70 29 0d 09 09 |mdp == o|emdp)...|
|00004220| 65 6d 64 70 2d 3e 6d 6f | 64 66 6c 67 20 3d 20 6d |emdp->mo|dflg = m|
|00004230| 6f 64 66 6c 67 3b 0d 09 | 09 2f 2a 20 6e 65 65 64 |odflg;..|./* need|
|00004240| 73 20 74 6f 20 62 65 20 | 75 70 64 61 74 65 64 20 |s to be |updated |
|00004250| 65 76 65 6e 20 69 66 20 | 6e 6f 20 63 6f 6e 74 65 |even if |no conte|
|00004260| 78 74 20 63 68 61 6e 67 | 65 20 73 6f 20 73 63 72 |xt chang|e so scr|
|00004270| 65 65 6e 5f 73 65 72 76 | 69 63 65 20 63 61 6e 0d |een_serv|ice can.|
|00004280| 09 09 09 70 69 63 6b 20 | 75 70 20 74 68 65 20 63 |...pick |up the c|
|00004290| 68 61 6e 67 65 73 20 2a | 2f 0d 09 65 6c 73 65 0d |hanges *|/..else.|
|000042a0| 09 09 67 65 74 63 6f 6e | 74 65 78 74 28 6f 65 6d |..getcon|text(oem|
|000042b0| 64 70 29 3b 0d 7d 0d 0d | 2f 2a 20 63 61 6c 6c 20 |dp);.}..|/* call |
|000042c0| 6f 70 6e 5f 75 73 72 20 | 61 66 74 65 72 20 67 65 |opn_usr |after ge|
|000042d0| 74 74 69 6e 67 20 74 68 | 65 20 63 6f 6e 74 65 78 |tting th|e contex|
|000042e0| 74 20 2a 2f 0d 0d 74 63 | 70 6f 70 6e 5f 75 73 72 |t */..tc|popn_usr|
|000042f0| 28 29 0d 7b 0d 09 73 74 | 72 75 63 74 20 77 69 6e |().{..st|ruct win|
|00004300| 64 73 20 2a 20 6f 65 6d | 64 70 3b 0d 09 0d 09 6f |ds * oem|dp;....o|
|00004310| 65 6d 64 70 20 3d 20 65 | 6d 64 70 3b 0d 09 67 65 |emdp = e|mdp;..ge|
|00004320| 74 63 6f 6e 74 65 78 74 | 28 74 63 70 65 6d 64 70 |tcontext|(tcpemdp|
|00004330| 29 3b 0d 09 6f 70 6e 5f | 75 73 72 28 29 3b 0d 09 |);..opn_|usr();..|
|00004340| 67 65 74 63 6f 6e 74 65 | 78 74 28 6f 65 6d 64 70 |getconte|xt(oemdp|
|00004350| 29 3b 0d 7d 0d 0d 2f 2a | 20 63 61 6c 6c 20 63 6c |);.}../*| call cl|
|00004360| 73 5f 75 73 72 20 61 66 | 74 65 72 20 67 65 74 74 |s_usr af|ter gett|
|00004370| 69 6e 67 20 74 68 65 20 | 63 6f 6e 74 65 78 74 20 |ing the |context |
|00004380| 2a 2f 0d 0d 74 63 70 63 | 6c 73 5f 75 73 72 28 29 |*/..tcpc|ls_usr()|
|00004390| 0d 7b 0d 09 73 74 72 75 | 63 74 20 77 69 6e 64 73 |.{..stru|ct winds|
|000043a0| 20 2a 20 6f 65 6d 64 70 | 3b 0d 09 0d 09 74 63 70 | * oemdp|;....tcp|
|000043b0| 65 6d 64 70 2d 3e 63 6c | 6f 73 65 66 6c 61 67 20 |emdp->cl|oseflag |
|000043c0| 3d 20 54 52 55 45 3b 0d | 09 6d 74 65 76 65 6e 74 |= TRUE;.|.mtevent|
|000043d0| 20 3d 20 54 52 55 45 3b | 0d 7d 0d 0d 0d 2f 2a 20 | = TRUE;|.}.../* |
|000043e0| 6d 61 6b 65 20 61 20 6e | 65 77 20 63 6f 6e 6e 65 |make a n|ew conne|
|000043f0| 63 74 69 6f 6e 2c 20 64 | 6f 20 75 73 65 72 20 64 |ction, d|o user d|
|00004400| 69 61 6c 6f 67 20 74 6f | 20 63 6f 6e 66 69 67 75 |ialog to| configu|
|00004410| 72 65 20 69 74 2c 20 61 | 6e 64 20 63 6f 6e 6e 65 |re it, a|nd conne|
|00004420| 63 74 20 2a 2f 0d 0d 6e | 65 77 63 6f 6e 6e 28 29 |ct */..n|ewconn()|
|00004430| 0d 7b 0d 09 69 66 20 28 | 6d 61 6b 65 63 6f 6e 6e |.{..if (|makeconn|
|00004440| 28 29 29 0d 09 09 72 65 | 74 75 72 6e 28 2d 31 29 |())...re|turn(-1)|
|00004450| 3b 0d 0d 09 6f 70 65 6e | 73 65 74 74 69 6e 67 73 |;...open|settings|
|00004460| 28 29 3b 0d 09 67 65 74 | 63 6f 6e 66 69 67 28 29 |();..get|config()|
|00004470| 3b 09 09 09 09 2f 2a 20 | 64 6f 20 66 69 72 73 74 |;..../* |do first|
|00004480| 2c 20 6e 61 6d 65 77 69 | 6e 64 6f 77 20 72 65 73 |, namewi|ndow res|
|00004490| 70 6f 6e 73 65 20 6d 61 | 79 20 6f 76 65 72 72 69 |ponse ma|y overri|
|000044a0| 64 65 20 2a 2f 0d 09 72 | 65 6c 65 61 73 65 63 6f |de */..r|eleaseco|
|000044b0| 6e 66 69 67 28 29 3b 09 | 09 09 2f 2a 20 72 65 6c |nfig();.|../* rel|
|000044c0| 65 61 73 65 20 68 61 6e | 64 6c 65 73 2c 20 77 68 |ease han|dles, wh|
|000044d0| 69 63 68 20 77 65 20 64 | 6f 6e 27 74 20 77 61 6e |ich we d|on't wan|
|000044e0| 74 20 74 6f 20 75 73 65 | 20 2a 2f 0d 09 0d 09 69 |t to use| */....i|
|000044f0| 66 20 28 6e 61 6d 65 77 | 69 6e 64 6f 77 28 29 29 |f (namew|indow())|
|00004500| 20 7b 0d 09 09 63 6c 6f | 73 65 73 65 74 74 69 6e | {...clo|sesettin|
|00004510| 67 73 28 29 3b 0d 09 09 | 6b 69 6c 6c 63 6f 6e 6e |gs();...|killconn|
|00004520| 28 29 3b 0d 09 09 72 65 | 74 75 72 6e 28 2d 31 29 |();...re|turn(-1)|
|00004530| 3b 0d 09 7d 0d 0d 09 65 | 6d 64 70 2d 3e 6e 65 77 |;..}...e|mdp->new|
|00004540| 63 6f 6e 66 20 3d 20 54 | 52 55 45 3b 09 09 0d 09 |conf = T|RUE;....|
|00004550| 09 2f 2a 20 69 74 27 73 | 20 61 20 6e 65 77 2c 20 |./* it's| a new, |
|00004560| 75 6e 6f 70 65 6e 65 64 | 20 66 69 6c 65 20 65 76 |unopened| file ev|
|00004570| 65 6e 20 69 66 20 22 55 | 6e 74 69 74 6c 65 64 22 |en if "U|ntitled"|
|00004580| 20 75 6e 63 68 61 6e 67 | 65 64 20 2a 2f 0d 0d 09 | unchang|ed */...|
|00004590| 73 65 74 61 70 70 66 69 | 6c 65 6e 61 6d 65 28 29 |setappfi|lename()|
|000045a0| 3b 0d 09 0d 09 69 66 20 | 28 6d 61 6b 65 77 69 6e |;....if |(makewin|
|000045b0| 64 28 29 29 20 7b 0d 09 | 09 63 6c 6f 73 65 73 65 |d()) {..|.closese|
|000045c0| 74 74 69 6e 67 73 28 29 | 3b 0d 09 09 6b 69 6c 6c |ttings()|;...kill|
|000045d0| 63 6f 6e 6e 28 29 3b 0d | 09 09 72 65 74 75 72 6e |conn();.|..return|
|000045e0| 28 2d 31 29 3b 0d 09 7d | 0d 09 0d 09 65 6d 64 70 |(-1);..}|....emdp|
|000045f0| 2d 3e 72 65 73 66 69 64 | 20 3d 20 30 3b 0d 09 73 |->resfid| = 0;..s|
|00004600| 65 74 77 69 6e 64 76 6f | 6c 73 28 65 6d 64 70 29 |etwindvo|ls(emdp)|
|00004610| 3b 09 09 09 2f 2a 20 73 | 65 74 20 64 65 66 61 75 |;.../* s|et defau|
|00004620| 6c 74 20 64 69 72 65 63 | 74 6f 72 69 65 73 20 2a |lt direc|tories *|
|00004630| 2f 0d 09 0d 09 63 6c 6f | 73 65 73 65 74 74 69 6e |/....clo|sesettin|
|00004640| 67 73 28 29 3b 0d 0d 09 | 65 6d 64 70 2d 3e 6b 65 |gs();...|emdp->ke|
|00004650| 79 78 68 65 61 64 20 3d | 20 4e 55 4c 4c 3b 09 09 |yxhead =| NULL;..|
|00004660| 2f 2a 20 64 6f 6e 27 74 | 20 69 6e 68 65 72 69 74 |/* don't| inherit|
|00004670| 20 6b 65 79 20 72 65 73 | 6f 75 72 63 65 73 20 2a | key res|ources *|
|00004680| 2f 0d 0d 09 72 65 73 74 | 6f 72 65 32 35 28 29 3b |/...rest|ore25();|
|00004690| 0d 09 61 64 64 77 69 6e | 64 6d 65 6e 75 28 65 6d |..addwin|dmenu(em|
|000046a0| 64 70 2d 3e 65 6d 77 69 | 6e 64 6f 77 29 3b 0d 0d |dp->emwi|ndow);..|
|000046b0| 09 6f 70 65 6e 63 6f 6e | 6e 28 65 6d 64 70 29 3b |.opencon|n(emdp);|
|000046c0| 0d 09 0d 09 72 65 74 75 | 72 6e 28 30 29 3b 0d 7d |....retu|rn(0);.}|
|000046d0| 0d 0d 0d 2f 2a 20 6d 61 | 6b 65 20 61 20 6e 65 77 |.../* ma|ke a new|
|000046e0| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 73 74 72 75 | connect|ion stru|
|000046f0| 63 74 75 72 65 2c 20 69 | 6e 69 74 69 61 6c 69 7a |cture, i|nitializ|
|00004700| 65 20 76 74 31 30 30 20 | 2a 2f 0d 09 0d 6d 61 6b |e vt100 |*/...mak|
|00004710| 65 63 6f 6e 6e 28 29 0d | 7b 0d 09 73 74 72 75 63 |econn().|{..struc|
|00004720| 74 20 77 69 6e 64 73 20 | 2a 20 6f 74 77 70 3b 0d |t winds |* otwp;.|
|00004730| 09 73 74 72 75 63 74 20 | 74 69 6d 65 72 20 2a 20 |.struct |timer * |
|00004740| 6f 74 69 6d 65 72 3b 0d | 09 0d 09 69 66 20 28 63 |otimer;.|...if (c|
|00004750| 6f 6e 6e 63 6f 75 6e 74 | 20 3e 3d 20 4d 41 58 57 |onncount| >= MAXW|
|00004760| 49 4e 44 29 0d 09 09 72 | 65 74 75 72 6e 28 2d 31 |IND)...r|eturn(-1|
|00004770| 29 3b 0d 0d 09 69 66 20 | 28 63 6f 6e 6e 61 76 61 |);...if |(connava|
|00004780| 69 6c 61 62 6c 65 29 20 | 7b 0d 09 09 2f 2a 20 65 |ilable) |{.../* e|
|00004790| 6d 64 70 20 69 73 20 74 | 68 65 20 6f 6e 6c 79 20 |mdp is t|he only |
|000047a0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 62 6c 6f 63 6b |connecti|on block|
|000047b0| 20 6c 79 69 6e 67 20 61 | 72 6f 75 6e 64 2c 0d 09 | lying a|round,..|
|000047c0| 09 09 6e 6f 20 77 69 6e | 64 6f 77 2c 20 6e 6f 20 |..no win|dow, no |
|000047d0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 2a 2f 0d 09 09 |connecti|on */...|
|000047e0| 63 6f 6e 6e 61 76 61 69 | 6c 61 62 6c 65 20 3d 20 |connavai|lable = |
|000047f0| 46 41 4c 53 45 3b 0d 09 | 09 65 6d 65 64 69 74 28 |FALSE;..|.emedit(|
|00004800| 65 6d 64 70 2c 20 54 52 | 55 45 29 3b 0d 09 09 0d |emdp, TR|UE);....|
|00004810| 09 09 2f 2a 20 73 61 76 | 65 20 74 68 69 6e 67 73 |../* sav|e things|
|00004820| 20 66 72 6f 6d 20 74 68 | 65 20 6f 6c 64 20 73 74 | from th|e old st|
|00004830| 72 75 63 74 75 72 65 20 | 2a 2f 0d 09 09 6f 74 69 |ructure |*/...oti|
|00004840| 6d 65 72 20 3d 20 65 6d | 64 70 2d 3e 74 6f 6b 65 |mer = em|dp->toke|
|00004850| 6e 5f 74 6d 3b 0d 09 09 | 6d 65 6d 7a 65 72 6f 28 |n_tm;...|memzero(|
|00004860| 65 6d 64 70 2c 20 73 69 | 7a 65 6f 66 28 73 74 72 |emdp, si|zeof(str|
|00004870| 75 63 74 20 77 69 6e 64 | 73 29 29 3b 0d 09 09 09 |uct wind|s));....|
|00004880| 2f 2a 20 7a 65 72 6f 20 | 6f 75 74 20 74 68 65 20 |/* zero |out the |
|00004890| 6e 65 77 20 73 74 72 75 | 63 74 75 72 65 20 2a 2f |new stru|cture */|
|000048a0| 0d 09 09 65 6d 64 70 2d | 3e 74 6f 6b 65 6e 5f 74 |...emdp-|>token_t|
|000048b0| 6d 20 3d 20 6f 74 69 6d | 65 72 3b 0d 09 7d 0d 09 |m = otim|er;..}..|
|000048c0| 65 6c 73 65 20 7b 0d 09 | 09 69 66 20 28 21 6d 65 |else {..|.if (!me|
|000048d0| 6d 74 65 73 74 28 28 6c | 6f 6e 67 29 20 73 69 7a |mtest((l|ong) siz|
|000048e0| 65 6f 66 28 73 74 72 75 | 63 74 20 77 69 6e 64 73 |eof(stru|ct winds|
|000048f0| 29 2c 20 22 74 6f 20 6d | 61 6b 65 20 73 65 73 73 |), "to m|ake sess|
|00004900| 69 6f 6e 22 29 29 20 7b | 0d 09 09 09 72 65 74 75 |ion")) {|....retu|
|00004910| 72 6e 28 2d 31 29 3b 0d | 09 09 7d 0d 09 09 6f 74 |rn(-1);.|..}...ot|
|00004920| 77 70 20 3d 20 65 6d 64 | 70 3b 0d 09 09 73 61 76 |wp = emd|p;...sav|
|00004930| 65 63 6f 6e 74 65 78 74 | 28 65 6d 64 70 29 3b 0d |econtext|(emdp);.|
|00004940| 09 09 65 6d 64 70 20 3d | 20 4e 65 77 50 74 72 28 |..emdp =| NewPtr(|
|00004950| 28 53 69 7a 65 29 20 28 | 73 69 7a 65 6f 66 28 73 |(Size) (|sizeof(s|
|00004960| 74 72 75 63 74 20 77 69 | 6e 64 73 29 29 29 3b 20 |truct wi|nds))); |
|00004970| 0d 09 09 69 66 20 28 65 | 6d 64 70 20 3d 3d 20 4e |...if (e|mdp == N|
|00004980| 55 4c 4c 29 20 7b 0d 09 | 09 09 65 6d 64 70 20 3d |ULL) {..|..emdp =|
|00004990| 20 6f 74 77 70 3b 0d 09 | 09 09 72 65 74 75 72 6e | otwp;..|..return|
|000049a0| 28 2d 31 29 3b 0d 09 09 | 7d 0d 09 09 6d 65 6d 7a |(-1);...|}...memz|
|000049b0| 65 72 6f 28 65 6d 64 70 | 2c 20 73 69 7a 65 6f 66 |ero(emdp|, sizeof|
|000049c0| 28 73 74 72 75 63 74 20 | 77 69 6e 64 73 29 29 3b |(struct |winds));|
|000049d0| 09 0d 09 09 09 2f 2a 20 | 7a 65 72 6f 20 6f 75 74 |...../* |zero out|
|000049e0| 20 74 68 65 20 6e 65 77 | 20 73 74 72 75 63 74 75 | the new| structu|
|000049f0| 72 65 20 2a 2f 0d 09 09 | 0d 09 09 73 65 74 63 6f |re */...|...setco|
|00004a00| 6e 74 65 78 74 28 65 6d | 64 70 29 3b 0d 0d 09 09 |ntext(em|dp);....|
|00004a10| 69 66 20 28 28 65 6d 64 | 70 2d 3e 74 6f 6b 65 6e |if ((emd|p->token|
|00004a20| 5f 74 6d 20 3d 20 74 6d | 5f 61 6c 6c 6f 63 28 29 |_tm = tm|_alloc()|
|00004a30| 29 20 3d 3d 20 4e 55 4c | 4c 29 20 7b 0d 09 09 09 |) == NUL|L) {....|
|00004a40| 44 69 73 70 6f 73 50 74 | 72 28 65 6d 64 70 29 3b |DisposPt|r(emdp);|
|00004a50| 0d 09 09 09 67 65 74 63 | 6f 6e 74 65 78 74 28 6f |....getc|ontext(o|
|00004a60| 74 77 70 29 3b 0d 09 09 | 09 72 65 74 75 72 6e 28 |twp);...|.return(|
|00004a70| 2d 31 29 3b 0d 09 09 7d | 0d 09 7d 0d 09 0d 09 65 |-1);...}|..}....e|
|00004a80| 6d 64 70 2d 3e 65 6d 77 | 69 6e 64 6f 77 20 3d 20 |mdp->emw|indow = |
|00004a90| 28 57 69 6e 64 6f 77 50 | 74 72 29 20 4e 55 4c 4c |(WindowP|tr) NULL|
|00004aa0| 3b 0d 09 65 6d 64 70 2d | 3e 69 63 6f 6e 77 69 6e |;..emdp-|>iconwin|
|00004ab0| 64 6f 77 20 3d 20 28 57 | 69 6e 64 6f 77 50 74 72 |dow = (W|indowPtr|
|00004ac0| 29 20 4e 55 4c 4c 3b 0d | 09 0d 09 65 6d 64 70 2d |) NULL;.|...emdp-|
|00004ad0| 3e 73 61 76 65 66 69 64 | 20 3d 20 30 3b 0d 09 65 |>savefid| = 0;..e|
|00004ae0| 6d 64 70 2d 3e 67 6f 74 | 6f 79 20 3d 20 2d 31 3b |mdp->got|oy = -1;|
|00004af0| 0d 0d 09 65 6d 64 70 2d | 3e 63 75 72 73 6f 72 77 |...emdp-|>cursorw|
|00004b00| 61 69 74 20 3d 20 54 52 | 55 45 3b 0d 09 69 62 6d |ait = TR|UE;..ibm|
|00004b10| 6d 6f 64 65 28 46 41 4c | 53 45 29 3b 0d 0d 09 65 |mode(FAL|SE);...e|
|00004b20| 6d 64 70 2d 3e 70 75 74 | 63 68 61 72 20 3d 20 6e |mdp->put|char = n|
|00004b30| 75 6c 6c 70 75 74 63 68 | 61 72 3b 0d 09 65 6d 64 |ullputch|ar;..emd|
|00004b40| 70 2d 3e 70 75 74 66 6c | 75 73 68 20 3d 20 6e 75 |p->putfl|ush = nu|
|00004b50| 6c 6c 70 75 74 66 6c 75 | 73 68 3b 0d 09 63 6f 6e |llputflu|sh;..con|
|00004b60| 6e 73 5b 63 6f 6e 6e 63 | 6f 75 6e 74 5d 20 3d 20 |ns[connc|ount] = |
|00004b70| 65 6d 64 70 3b 0d 09 63 | 6f 6e 6e 63 6f 75 6e 74 |emdp;..c|onncount|
|00004b80| 2b 2b 3b 0d 0d 09 72 65 | 74 75 72 6e 28 30 29 3b |++;...re|turn(0);|
|00004b90| 0d 0d 7d 0d 0d 2f 2a 20 | 64 65 73 74 72 6f 79 20 |..}../* |destroy |
|00004ba0| 74 68 65 20 6d 6f 73 74 | 20 72 65 63 65 6e 74 20 |the most| recent |
|00004bb0| 61 74 74 65 6d 70 74 20 | 74 6f 20 6d 61 6b 65 20 |attempt |to make |
|00004bc0| 61 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 73 74 72 |a connec|tion str|
|00004bd0| 75 63 74 75 72 65 20 2a | 2f 0d 0d 6b 69 6c 6c 63 |ucture *|/..killc|
|00004be0| 6f 6e 6e 28 29 0d 7b 0d | 09 2d 2d 63 6f 6e 6e 63 |onn().{.|.--connc|
|00004bf0| 6f 75 6e 74 3b 0d 09 63 | 6f 6e 6e 73 5b 63 6f 6e |ount;..c|onns[con|
|00004c00| 6e 63 6f 75 6e 74 5d 20 | 3d 20 4e 55 4c 4c 3b 0d |ncount] |= NULL;.|
|00004c10| 09 69 66 20 28 6b 65 79 | 64 70 20 21 3d 20 4e 55 |.if (key|dp != NU|
|00004c20| 4c 4c 29 20 7b 0d 09 09 | 44 69 73 70 6f 73 50 74 |LL) {...|DisposPt|
|00004c30| 72 28 65 6d 64 70 29 3b | 0d 09 09 73 65 74 63 6f |r(emdp);|...setco|
|00004c40| 6e 74 65 78 74 28 6b 65 | 79 64 70 29 3b 0d 09 7d |ntext(ke|ydp);..}|
|00004c50| 0d 09 65 6c 73 65 20 7b | 0d 09 09 73 65 74 63 6f |..else {|...setco|
|00004c60| 6e 74 65 78 74 28 63 6f | 6e 6e 73 5b 30 5d 29 3b |ntext(co|nns[0]);|
|00004c70| 0d 09 7d 09 09 0d 7d 0d | 0d 0d 2f 2a 20 73 74 61 |..}...}.|../* sta|
|00004c80| 6e 64 61 72 64 20 63 6c | 6f 73 65 20 62 6f 74 74 |ndard cl|ose bott|
|00004c90| 6c 65 6e 65 63 6b 20 63 | 61 6c 6c 20 2a 2f 0d 0d |leneck c|all */..|
|00004ca0| 63 6c 6f 73 65 63 6f 6e | 6e 28 74 77 70 29 0d 73 |closecon|n(twp).s|
|00004cb0| 74 72 75 63 74 20 77 69 | 6e 64 73 20 2a 20 74 77 |truct wi|nds * tw|
|00004cc0| 70 3b 0d 7b 0d 09 69 66 | 20 28 74 77 70 2d 3e 63 |p;.{..if| (twp->c|
|00004cd0| 6f 6e 6e 6f 70 65 6e 29 | 20 7b 0d 09 09 67 65 74 |onnopen)| {...get|
|00004ce0| 63 6f 6e 74 65 78 74 28 | 74 77 70 29 3b 0d 09 09 |context(|twp);...|
|00004cf0| 69 66 20 28 21 68 6f 73 | 74 63 6c 6f 73 65 6d 61 |if (!hos|tclosema|
|00004d00| 63 72 6f 28 74 77 70 2d | 3e 63 6c 6f 73 65 6d 61 |cro(twp-|>closema|
|00004d10| 63 72 6f 29 29 0d 09 09 | 09 2f 2a 20 69 66 20 74 |cro))...|./* if t|
|00004d20| 68 65 72 65 27 73 20 6e | 6f 20 63 6c 6f 73 65 20 |here's n|o close |
|00004d30| 6d 61 63 72 6f 2c 20 67 | 6f 20 61 68 65 61 64 20 |macro, g|o ahead |
|00004d40| 61 6e 64 20 63 6c 6f 73 | 65 20 69 74 20 75 70 20 |and clos|e it up |
|00004d50| 2a 2f 0d 09 09 09 64 6f | 63 6c 6f 73 65 63 6f 6e |*/....do|closecon|
|00004d60| 6e 28 29 3b 0d 09 7d 0d | 7d 0d 0d 2f 2a 20 52 45 |n();..}.|}../* RE|
|00004d70| 41 4c 4c 59 20 64 6f 20 | 61 20 63 6c 6f 73 65 20 |ALLY do |a close |
|00004d80| 6f 6e 20 74 68 65 20 65 | 6d 64 70 20 63 6f 6e 6e |on the e|mdp conn|
|00004d90| 65 63 74 69 6f 6e 20 2a | 2f 0d 0d 64 6f 63 6c 6f |ection *|/..doclo|
|00004da0| 73 65 63 6f 6e 6e 28 29 | 0d 7b 0d 09 69 66 20 28 |seconn()|.{..if (|
|00004db0| 21 65 6d 64 70 2d 3e 63 | 6f 6e 6e 6f 70 65 6e 29 |!emdp->c|onnopen)|
|00004dc0| 20 7b 0d 09 09 72 65 74 | 75 72 6e 28 29 3b 0d 09 | {...ret|urn();..|
|00004dd0| 7d 0d 09 69 66 20 28 65 | 6d 64 70 2d 3e 63 6f 6e |}..if (e|mdp->con|
|00004de0| 6e 74 79 70 65 20 3d 3d | 20 43 4f 4e 4e 5f 4d 41 |ntype ==| CONN_MA|
|00004df0| 43 54 43 50 29 20 7b 0d | 09 09 6d 61 63 74 63 70 |CTCP) {.|..mactcp|
|00004e00| 5f 63 6c 6f 73 65 28 29 | 3b 0d 09 7d 0d 23 69 66 |_close()|;..}.#if|
|00004e10| 64 65 66 20 44 55 41 4c | 54 43 50 0d 09 65 6c 73 |def DUAL|TCP..els|
|00004e20| 65 20 69 66 20 28 65 6d | 64 70 2d 3e 63 6f 6e 6e |e if (em|dp->conn|
|00004e30| 74 79 70 65 20 3d 3d 20 | 43 4f 4e 4e 5f 43 55 54 |type == |CONN_CUT|
|00004e40| 43 50 29 20 7b 0d 09 09 | 74 63 70 5f 63 6c 6f 73 |CP) {...|tcp_clos|
|00004e50| 65 28 29 3b 0d 09 09 65 | 6d 64 70 2d 3e 75 63 62 |e();...e|mdp->ucb|
|00004e60| 2e 75 5f 73 74 61 74 65 | 20 3d 20 43 4c 4f 53 49 |.u_state| = CLOSI|
|00004e70| 4e 47 3b 0d 09 09 65 6d | 64 70 2d 3e 75 63 62 2e |NG;...em|dp->ucb.|
|00004e80| 75 5f 72 73 74 61 74 65 | 20 3d 20 42 4c 4f 43 4b |u_rstate| = BLOCK|
|00004e90| 3b 0d 09 7d 0d 23 65 6e | 64 69 66 0d 09 65 6c 73 |;..}.#en|dif..els|
|00004ea0| 65 20 69 66 20 28 65 6d | 64 70 2d 3e 63 6f 6e 6e |e if (em|dp->conn|
|00004eb0| 74 79 70 65 20 3d 3d 20 | 43 4f 4e 4e 5f 53 45 52 |type == |CONN_SER|
|00004ec0| 44 29 20 7b 0d 09 09 77 | 69 6e 64 6d 65 6e 75 6d |D) {...w|indmenum|
|00004ed0| 61 72 6b 28 65 6d 64 70 | 2c 20 6e 6f 4d 61 72 6b |ark(emdp|, noMark|
|00004ee0| 29 3b 09 09 2f 2a 20 63 | 6c 65 61 72 20 61 6e 79 |);../* c|lear any|
|00004ef0| 20 6d 61 72 6b 73 20 2a | 2f 0d 09 09 63 6c 6f 73 | marks *|/...clos|
|00004f00| 65 73 65 72 70 6f 72 74 | 28 65 6d 64 70 29 3b 0d |eserport|(emdp);.|
|00004f10| 09 09 63 6c 73 5f 75 73 | 72 28 29 3b 09 09 09 2f |..cls_us|r();.../|
|00004f20| 2a 20 57 41 52 4e 49 4e | 47 3a 20 74 77 70 20 6d |* WARNIN|G: twp m|
|00004f30| 61 79 20 64 69 73 61 70 | 70 65 61 72 2c 20 65 6d |ay disap|pear, em|
|00004f40| 64 70 20 6d 61 79 20 63 | 68 61 6e 67 65 21 20 2a |dp may c|hange! *|
|00004f50| 2f 0d 09 7d 0d 7d 0d 0d | 0d 2f 2a 20 72 65 6d 6f |/..}.}..|./* remo|
|00004f60| 76 65 20 61 20 63 6f 6e | 6e 65 63 74 69 6f 6e 20 |ve a con|nection |
|00004f70| 66 72 6f 6d 20 74 68 65 | 20 74 61 62 6c 65 2c 20 |from the| table, |
|00004f80| 77 65 20 68 61 76 65 20 | 6e 6f 20 63 6f 6e 6e 65 |we have |no conne|
|00004f90| 63 74 69 6f 6e 20 2a 2f | 0d 0d 72 65 6c 65 61 73 |ction */|..releas|
|00004fa0| 65 63 6f 6e 6e 28 74 77 | 70 29 0d 73 74 72 75 63 |econn(tw|p).struc|
|00004fb0| 74 20 77 69 6e 64 73 20 | 2a 20 74 77 70 3b 0d 7b |t winds |* twp;.{|
|00004fc0| 0d 09 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |..regist|er short|
|00004fd0| 20 63 6f 75 6e 74 20 3d | 20 30 3b 0d 09 0d 09 66 | count =| 0;....f|
|00004fe0| 6f 72 20 28 63 6f 75 6e | 74 20 3d 20 30 3b 20 63 |or (coun|t = 0; c|
|00004ff0| 6f 75 6e 74 20 3c 20 63 | 6f 6e 6e 63 6f 75 6e 74 |ount < c|onncount|
|00005000| 3b 20 63 6f 75 6e 74 20 | 2b 2b 29 20 7b 0d 09 09 |; count |++) {...|
|00005010| 69 66 20 28 74 77 70 20 | 3d 3d 20 63 6f 6e 6e 73 |if (twp |== conns|
|00005020| 5b 63 6f 75 6e 74 5d 29 | 0d 09 09 09 62 72 65 61 |[count])|....brea|
|00005030| 6b 3b 0d 09 7d 0d 09 69 | 66 20 28 63 6f 75 6e 74 |k;..}..i|f (count|
|00005040| 20 3d 3d 20 63 6f 6e 6e | 63 6f 75 6e 74 29 0d 09 | == conn|count)..|
|00005050| 09 2f 2a 20 6e 6f 20 73 | 75 63 68 20 63 6f 6e 6e |./* no s|uch conn|
|00005060| 65 63 74 69 6f 6e 20 65 | 78 69 73 74 73 20 2a 2f |ection e|xists */|
|00005070| 0d 09 09 72 65 74 75 72 | 6e 28 2d 31 29 3b 0d 09 |...retur|n(-1);..|
|00005080| 0d 09 2f 2a 20 77 65 20 | 66 6f 75 6e 64 20 61 20 |../* we |found a |
|00005090| 6d 61 74 63 68 2c 20 72 | 65 6c 65 61 73 65 20 72 |match, r|elease r|
|000050a0| 65 73 6f 75 72 63 65 73 | 20 61 73 73 6f 63 69 61 |esources| associa|
|000050b0| 74 65 64 20 77 69 74 68 | 20 69 74 20 2a 2f 0d 09 |ted with| it */..|
|000050c0| 69 66 20 28 74 77 70 2d | 3e 63 6f 6e 6e 74 79 70 |if (twp-|>conntyp|
|000050d0| 65 20 3d 3d 20 43 4f 4e | 4e 5f 4d 41 43 54 43 50 |e == CON|N_MACTCP|
|000050e0| 29 20 7b 0d 09 09 69 66 | 20 28 6d 61 63 74 63 70 |) {...if| (mactcp|
|000050f0| 6f 70 65 6e 29 20 7b 0d | 09 09 09 74 63 70 5f 72 |open) {.|...tcp_r|
|00005100| 65 6c 65 61 73 65 28 74 | 77 70 29 3b 0d 09 09 09 |elease(t|wp);....|
|00005110| 74 63 70 6d 65 6d 6f 72 | 79 72 65 63 6c 61 69 6d |tcpmemor|yreclaim|
|00005120| 28 74 77 70 29 3b 0d 09 | 09 7d 0d 09 7d 0d 23 69 |(twp);..|.}..}.#i|
|00005130| 66 64 65 66 20 44 55 41 | 4c 54 43 50 0d 09 65 6c |fdef DUA|LTCP..el|
|00005140| 73 65 20 69 66 20 28 74 | 77 70 2d 3e 63 6f 6e 6e |se if (t|wp->conn|
|00005150| 74 79 70 65 20 3d 3d 20 | 43 4f 4e 4e 5f 43 55 54 |type == |CONN_CUT|
|00005160| 43 50 29 20 7b 0d 09 09 | 69 66 20 28 63 75 74 63 |CP) {...|if (cutc|
|00005170| 70 6f 70 65 6e 29 20 7b | 0d 09 09 09 2f 2a 20 54 |popen) {|..../* T|
|00005180| 4f 44 4f 20 73 68 6f 75 | 6c 64 20 77 65 20 63 6c |ODO shou|ld we cl|
|00005190| 6f 73 65 20 64 6f 77 6e | 20 43 6f 72 6e 65 6c 6c |ose down| Cornell|
|000051a0| 20 54 43 50 20 63 6f 6d | 70 6c 65 74 65 6c 79 20 | TCP com|pletely |
|000051b0| 74 6f 0d 09 09 09 09 61 | 6c 6c 6f 77 20 4d 61 63 |to.....a|llow Mac|
|000051c0| 54 43 50 20 74 6f 20 72 | 75 6e 3f 20 2a 2f 0d 09 |TCP to r|un? */..|
|000051d0| 09 09 2f 2a 20 74 63 70 | 65 6d 64 70 20 3d 20 4e |../* tcp|emdp = N|
|000051e0| 55 4c 4c 3b 09 09 54 4f | 44 4f 20 74 68 69 73 20 |ULL;..TO|DO this |
|000051f0| 69 73 20 69 6d 70 72 6f | 70 65 72 21 20 2a 2f 0d |is impro|per! */.|
|00005200| 09 09 09 3b 0d 09 09 7d | 0d 09 7d 0d 23 65 6e 64 |...;...}|..}.#end|
|00005210| 69 66 0d 09 65 6c 73 65 | 20 69 66 20 28 74 77 70 |if..else| if (twp|
|00005220| 2d 3e 63 6f 6e 6e 74 79 | 70 65 20 3d 3d 20 43 4f |->connty|pe == CO|
|00005230| 4e 4e 5f 53 45 52 44 29 | 20 7b 0d 09 09 63 6c 6f |NN_SERD)| {...clo|
|00005240| 73 65 73 65 72 70 6f 72 | 74 28 74 77 70 29 3b 0d |seserpor|t(twp);.|
|00005250| 09 7d 0d 09 0d 09 0d 09 | 69 66 20 28 63 6f 6e 6e |.}......|if (conn|
|00005260| 63 6f 75 6e 74 20 3e 20 | 31 29 20 7b 0d 09 09 2f |count > |1) {.../|
|00005270| 2a 20 6b 69 6c 6c 20 69 | 74 20 2a 2f 0d 09 09 0d |* kill i|t */....|
|00005280| 09 09 61 73 63 69 69 5f | 66 72 65 65 28 74 77 70 |..ascii_|free(twp|
|00005290| 29 3b 09 09 09 09 2f 2a | 20 72 65 6c 65 61 73 65 |);..../*| release|
|000052a0| 20 61 6e 79 20 41 53 43 | 49 49 20 65 6d 75 6c 61 | any ASC|II emula|
|000052b0| 74 6f 72 20 6d 65 6d 6f | 72 79 20 2a 2f 0d 09 09 |tor memo|ry */...|
|000052c0| 69 62 6d 5f 66 72 65 65 | 28 74 77 70 29 3b 09 09 |ibm_free|(twp);..|
|000052d0| 09 09 2f 2a 20 72 65 6c | 65 61 73 65 20 61 6e 79 |../* rel|ease any|
|000052e0| 20 49 42 4d 20 65 6d 75 | 6c 61 74 6f 72 20 6d 65 | IBM emu|lator me|
|000052f0| 6d 6f 72 79 20 2a 2f 0d | 09 09 74 6d 5f 63 6c 65 |mory */.|..tm_cle|
|00005300| 61 72 28 74 77 70 2d 3e | 74 6f 6b 65 6e 5f 74 6d |ar(twp->|token_tm|
|00005310| 29 3b 0d 09 09 74 6d 5f | 66 72 65 65 28 74 77 70 |);...tm_|free(twp|
|00005320| 2d 3e 74 6f 6b 65 6e 5f | 74 6d 29 3b 0d 09 09 44 |->token_|tm);...D|
|00005330| 69 73 70 6f 73 50 74 72 | 28 74 77 70 29 3b 0d 0d |isposPtr|(twp);..|
|00005340| 09 09 2f 2a 20 6e 6f 77 | 20 73 68 69 66 74 20 64 |../* now| shift d|
|00005350| 6f 77 6e 20 74 68 65 20 | 6f 74 68 65 72 20 63 6f |own the |other co|
|00005360| 6e 6e 73 20 69 6e 20 74 | 68 65 20 74 61 62 6c 65 |nns in t|he table|
|00005370| 20 2a 2f 0d 09 09 66 6f | 72 20 28 20 63 6f 75 6e | */...fo|r ( coun|
|00005380| 74 2b 2b 20 3b 20 63 6f | 75 6e 74 20 3c 20 63 6f |t++ ; co|unt < co|
|00005390| 6e 6e 63 6f 75 6e 74 3b | 20 63 6f 75 6e 74 2b 2b |nncount;| count++|
|000053a0| 29 20 7b 0d 09 09 09 63 | 6f 6e 6e 73 5b 63 6f 75 |) {....c|onns[cou|
|000053b0| 6e 74 20 2d 20 31 5d 20 | 3d 20 63 6f 6e 6e 73 5b |nt - 1] |= conns[|
|000053c0| 63 6f 75 6e 74 5d 3b 0d | 09 09 7d 0d 09 09 0d 09 |count];.|..}.....|
|000053d0| 09 2f 2a 20 73 65 74 20 | 74 68 65 20 63 6f 6e 74 |./* set |the cont|
|000053e0| 65 78 74 20 74 6f 20 74 | 68 65 20 66 69 72 73 74 |ext to t|he first|
|000053f0| 20 6f 6e 65 20 2a 2f 0d | 09 09 69 66 20 28 74 77 | one */.|..if (tw|
|00005400| 70 20 3d 3d 20 65 6d 64 | 70 20 29 20 7b 0d 09 09 |p == emd|p ) {...|
|00005410| 09 2f 2a 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |./* the |current |
|00005420| 63 6f 6e 74 65 78 74 20 | 68 61 73 20 62 65 65 6e |context |has been|
|00005430| 20 64 65 76 61 73 74 61 | 74 65 64 20 2a 2f 0d 09 | devasta|ted */..|
|00005440| 09 09 65 6d 64 70 20 3d | 20 4e 55 4c 4c 3b 09 09 |..emdp =| NULL;..|
|00005450| 09 0d 09 09 09 67 65 74 | 63 6f 6e 74 65 78 74 28 |.....get|context(|
|00005460| 63 6f 6e 6e 73 5b 30 5d | 29 3b 09 2f 2a 20 73 65 |conns[0]|);./* se|
|00005470| 74 20 63 6f 6e 74 65 78 | 74 20 74 6f 20 74 68 65 |t contex|t to the|
|00005480| 20 66 69 72 73 74 20 6f | 6e 65 20 69 6e 20 74 68 | first o|ne in th|
|00005490| 65 20 74 61 62 6c 65 20 | 2a 2f 0d 09 09 7d 0d 09 |e table |*/...}..|
|000054a0| 09 69 66 20 28 74 77 70 | 20 3d 3d 20 6b 65 79 64 |.if (twp| == keyd|
|000054b0| 70 29 20 7b 0d 09 09 09 | 2f 2a 20 69 66 20 74 68 |p) {....|/* if th|
|000054c0| 65 20 63 6f 6e 74 65 78 | 74 20 77 61 73 20 74 68 |e contex|t was th|
|000054d0| 65 20 6f 6e 65 20 6f 6e | 20 74 6f 70 2d 2d 76 65 |e one on| top--ve|
|000054e0| 72 79 20 6c 69 6b 65 6c | 79 2d 2d 0d 09 09 09 09 |ry likel|y--.....|
|000054f0| 69 74 20 65 78 69 73 74 | 73 20 6e 6f 20 6c 6f 6e |it exist|s no lon|
|00005500| 67 65 72 2e 2e 2e 20 2a | 2f 0d 09 09 09 6b 65 79 |ger... *|/....key|
|00005510| 64 70 20 3d 20 4e 55 4c | 4c 3b 0d 09 09 09 6b 65 |dp = NUL|L;....ke|
|00005520| 79 77 69 6e 64 6f 77 20 | 3d 20 4e 55 4c 4c 3b 0d |ywindow |= NULL;.|
|00005530| 09 09 7d 0d 09 7d 0d 09 | 65 6c 73 65 20 7b 0d 09 |..}..}..|else {..|
|00005540| 09 2f 2a 20 6c 65 61 76 | 65 20 6f 6e 65 20 65 6d |./* leav|e one em|
|00005550| 64 70 20 73 74 72 75 63 | 74 20 61 72 6f 75 6e 64 |dp struc|t around|
|00005560| 20 73 6f 0d 09 09 09 6f | 6e 6c 79 20 31 20 63 6f | so....o|nly 1 co|
|00005570| 6e 6e 20 73 74 72 75 63 | 74 20 77 2f 20 6e 6f 20 |nn struc|t w/ no |
|00005580| 77 69 6e 64 6f 77 20 65 | 78 69 73 74 73 20 2a 2f |window e|xists */|
|00005590| 0d 09 09 0d 09 09 69 66 | 20 28 71 75 69 74 6f 6e |......if| (quiton|
|000055a0| 63 6c 6f 73 65 29 0d 09 | 09 09 2f 2a 20 75 73 65 |close)..|../* use|
|000055b0| 72 20 77 61 6e 74 73 20 | 63 6c 6f 73 65 20 77 68 |r wants |close wh|
|000055c0| 65 6e 20 6e 6f 20 77 69 | 6e 64 6f 77 73 2f 73 65 |en no wi|ndows/se|
|000055d0| 73 73 69 6f 6e 73 20 65 | 78 69 73 74 20 2a 2f 0d |ssions e|xist */.|
|000055e0| 09 09 09 63 75 5f 65 78 | 69 74 28 30 29 3b 0d 09 |...cu_ex|it(0);..|
|000055f0| 09 09 0d 09 09 63 6f 6e | 6e 61 76 61 69 6c 61 62 |.....con|navailab|
|00005600| 6c 65 20 3d 20 54 52 55 | 45 3b 09 0d 09 09 73 65 |le = TRU|E;....se|
|00005610| 74 63 6f 6e 74 65 78 74 | 28 65 6d 64 70 29 3b 0d |tcontext|(emdp);.|
|00005620| 09 09 0d 09 09 6b 65 79 | 64 70 20 3d 20 4e 55 4c |.....key|dp = NUL|
|00005630| 4c 3b 0d 09 09 6b 65 79 | 77 69 6e 64 6f 77 20 3d |L;...key|window =|
|00005640| 20 4e 55 4c 4c 3b 0d 09 | 09 0d 09 09 65 6d 65 64 | NULL;..|....emed|
|00005650| 69 74 28 65 6d 64 70 2c | 20 54 52 55 45 29 3b 0d |it(emdp,| TRUE);.|
|00005660| 09 09 73 68 6f 77 63 75 | 72 73 6f 72 28 29 3b 09 |..showcu|rsor();.|
|00005670| 09 09 09 2f 2a 20 6d 61 | 6b 65 20 73 75 72 65 20 |.../* ma|ke sure |
|00005680| 63 75 72 73 6f 72 20 64 | 72 61 77 6e 20 2a 2f 0d |cursor d|rawn */.|
|00005690| 09 09 2f 2a 20 54 4f 44 | 4f 20 77 69 6e 64 6f 77 |../* TOD|O window|
|000056a0| 73 20 6e 65 65 64 20 74 | 6f 20 62 65 20 72 65 73 |s need t|o be res|
|000056b0| 65 74 20 61 6e 64 20 73 | 68 6f 75 6c 64 20 74 68 |et and s|hould th|
|000056c0| 65 20 63 6f 6e 66 69 67 | 20 62 65 20 72 65 73 65 |e config| be rese|
|000056d0| 74 3f 20 2a 2f 0d 09 7d | 0d 09 2d 2d 63 6f 6e 6e |t? */..}|..--conn|
|000056e0| 63 6f 75 6e 74 3b 0d 09 | 63 6f 6e 6e 73 5b 63 6f |count;..|conns[co|
|000056f0| 6e 6e 63 6f 75 6e 74 5d | 20 3d 20 4e 55 4c 4c 3b |nncount]| = NULL;|
|00005700| 0d 7d 0d 0d 0d 2f 2a 20 | 6f 70 65 6e 20 61 20 63 |.}.../* |open a c|
|00005710| 6f 6e 6e 65 63 74 69 6f | 6e 20 66 6f 72 20 61 20 |onnectio|n for a |
|00005720| 63 6f 6e 6e 65 63 74 69 | 6f 6e 2f 77 69 6e 64 6f |connecti|on/windo|
|00005730| 77 20 73 74 72 75 63 74 | 75 72 65 0d 09 6d 75 73 |w struct|ure..mus|
|00005740| 74 20 62 65 20 69 6e 20 | 65 6d 64 70 20 63 6f 6e |t be in |emdp con|
|00005750| 74 65 78 74 20 28 75 73 | 69 6e 67 20 67 65 74 63 |text (us|ing getc|
|00005760| 6f 6e 74 65 78 74 28 29 | 20 6f 72 20 6d 61 6b 65 |ontext()| or make|
|00005770| 63 6f 6e 6e 28 29 20 29 | 0d 2a 2f 0d 0d 6f 70 65 |conn() )|.*/..ope|
|00005780| 6e 63 6f 6e 6e 28 74 77 | 70 29 0d 73 74 72 75 63 |nconn(tw|p).struc|
|00005790| 74 20 77 69 6e 64 73 20 | 2a 20 74 77 70 3b 0d 7b |t winds |* twp;.{|
|000057a0| 0d 09 75 6e 73 69 67 6e | 65 64 20 73 6f 63 6b 3b |..unsign|ed sock;|
|000057b0| 0d 0d 23 69 66 64 65 66 | 20 41 52 50 46 4f 52 48 |..#ifdef| ARPFORH|
|000057c0| 4f 53 54 0d 09 69 66 20 | 28 21 61 74 5f 61 72 70 |OST..if |(!at_arp|
|000057d0| 28 66 68 6f 73 74 2e 75 | 2e 61 64 64 72 29 29 0d |(fhost.u|.addr)).|
|000057e0| 09 09 72 65 74 75 72 6e | 28 2d 32 29 3b 0d 23 65 |..return|(-2);.#e|
|000057f0| 6e 64 69 66 0d 0d 09 69 | 66 20 28 74 77 70 2d 3e |ndif...i|f (twp->|
|00005800| 63 6f 6e 6e 6f 70 65 6e | 29 0d 09 09 72 65 74 75 |connopen|)...retu|
|00005810| 72 6e 3b 0d 0d 23 69 66 | 64 65 66 20 4d 41 43 54 |rn;..#if|def MACT|
|00005820| 43 50 0d 09 69 66 20 28 | 74 77 70 2d 3e 63 6f 6e |CP..if (|twp->con|
|00005830| 6e 74 79 70 65 20 3d 3d | 20 43 4f 4e 4e 5f 43 55 |ntype ==| CONN_CU|
|00005840| 54 43 50 29 20 7b 0d 09 | 09 2f 2a 20 66 6f 72 63 |TCP) {..|./* forc|
|00005850| 65 20 69 74 20 2a 2f 0d | 09 09 74 77 70 2d 3e 63 |e it */.|..twp->c|
|00005860| 6f 6e 6e 74 79 70 65 20 | 3d 20 43 4f 4e 4e 5f 4d |onntype |= CONN_M|
|00005870| 41 43 54 43 50 3b 0d 09 | 7d 0d 23 65 6e 64 69 66 |ACTCP;..|}.#endif|
|00005880| 0d 0d 09 69 66 20 28 74 | 77 70 2d 3e 65 6d 77 69 |...if (t|wp->emwi|
|00005890| 6e 64 6f 77 29 20 7b 0d | 09 09 2f 2a 20 66 69 78 |ndow) {.|../* fix|
|000058a0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 61 6e 64 20 | the win|dow and |
|000058b0| 6d 65 6e 75 20 2a 2f 0d | 09 09 77 69 6e 64 6d 65 |menu */.|..windme|
|000058c0| 6e 75 6d 61 72 6b 28 74 | 77 70 2c 20 6e 6f 4d 61 |numark(t|wp, noMa|
|000058d0| 72 6b 29 3b 09 09 2f 2a | 20 63 6c 65 61 72 20 61 |rk);../*| clear a|
|000058e0| 6e 79 20 6d 61 72 6b 73 | 20 2a 2f 0d 09 09 72 65 |ny marks| */...re|
|000058f0| 73 74 6f 72 65 32 35 28 | 29 3b 0d 09 7d 0d 09 09 |store25(|);..}...|
|00005900| 0d 09 69 66 20 28 74 77 | 70 2d 3e 63 6f 6e 6e 74 |..if (tw|p->connt|
|00005910| 79 70 65 20 3d 3d 20 43 | 4f 4e 4e 5f 4d 41 43 54 |ype == C|ONN_MACT|
|00005920| 43 50 0d 09 09 09 7c 7c | 20 74 77 70 2d 3e 63 6f |CP....||| twp->co|
|00005930| 6e 6e 74 79 70 65 20 3d | 3d 20 43 4f 4e 4e 5f 43 |nntype =|= CONN_C|
|00005940| 55 54 43 50 29 20 7b 0d | 09 09 74 65 6c 6e 65 74 |UTCP) {.|..telnet|
|00005950| 72 65 73 65 74 28 74 77 | 70 2d 3e 74 65 72 6d 74 |reset(tw|p->termt|
|00005960| 79 70 65 29 3b 0d 09 7d | 0d 09 09 09 09 0d 09 69 |ype);..}|.......i|
|00005970| 66 20 28 74 77 70 2d 3e | 63 6f 6e 6e 74 79 70 65 |f (twp->|conntype|
|00005980| 20 3d 3d 20 43 4f 4e 4e | 5f 4d 41 43 54 43 50 20 | == CONN|_MACTCP |
|00005990| 0d 09 09 7c 7c 20 6d 61 | 63 69 70 6f 70 65 6e 20 |...|| ma|cipopen |
|000059a0| 26 26 20 74 77 70 2d 3e | 63 6f 6e 6e 74 79 70 65 |&& twp->|conntype|
|000059b0| 20 3d 3d 20 43 4f 4e 4e | 5f 43 55 54 43 50 29 20 | == CONN|_CUTCP) |
|000059c0| 7b 0d 09 09 2f 2a 20 63 | 6f 65 72 63 65 20 4d 61 |{.../* c|oerce Ma|
|000059d0| 63 54 43 50 20 63 6f 6e | 66 69 67 75 72 61 74 69 |cTCP con|figurati|
|000059e0| 6f 6e 20 69 66 20 43 6f | 72 6e 65 6c 6c 20 61 6c |on if Co|rnell al|
|000059f0| 72 65 61 64 79 20 73 74 | 61 72 74 65 64 20 2a 2f |ready st|arted */|
|00005a00| 0d 09 09 0d 09 09 65 78 | 74 65 72 6e 20 69 6e 74 |......ex|tern int|
|00005a10| 20 6d 61 63 74 63 70 5f | 70 75 74 28 29 3b 0d 09 | mactcp_|put();..|
|00005a20| 09 65 78 74 65 72 6e 20 | 69 6e 74 20 6d 61 63 74 |.extern |int mact|
|00005a30| 63 70 5f 65 78 28 29 3b | 0d 0d 09 09 74 77 70 2d |cp_ex();|....twp-|
|00005a40| 3e 63 6f 6e 6e 74 79 70 | 65 20 3d 20 43 4f 4e 4e |>conntyp|e = CONN|
|00005a50| 5f 4d 41 43 54 43 50 3b | 0d 09 09 0d 09 09 74 77 |_MACTCP;|......tw|
|00005a60| 70 2d 3e 70 75 74 63 68 | 61 72 20 3d 20 6d 61 63 |p->putch|ar = mac|
|00005a70| 74 63 70 5f 70 75 74 3b | 0d 09 09 74 77 70 2d 3e |tcp_put;|...twp->|
|00005a80| 70 75 74 66 6c 75 73 68 | 20 3d 20 6d 61 63 74 63 |putflush| = mactc|
|00005a90| 70 5f 65 78 3b 0d 09 09 | 0d 09 09 73 6f 63 6b 20 |p_ex;...|...sock |
|00005aa0| 3d 20 74 6e 5f 73 6f 63 | 6b 28 29 3b 0d 09 09 69 |= tn_soc|k();...i|
|00005ab0| 66 20 28 74 77 70 2d 3e | 66 68 6f 73 74 2e 75 2e |f (twp->|fhost.u.|
|00005ac0| 61 64 64 72 20 3d 3d 20 | 2d 31 4c 0d 09 09 09 7c |addr == |-1L....||
|00005ad0| 7c 20 74 77 70 2d 3e 66 | 68 6f 73 74 2e 75 2e 61 || twp->f|host.u.a|
|00005ae0| 64 64 72 20 3d 3d 20 30 | 4c 29 20 7b 0d 09 09 09 |ddr == 0|L) {....|
|00005af0| 09 2f 2a 20 61 76 6f 69 | 64 20 6f 70 65 6e 69 6e |./* avoi|d openin|
|00005b00| 67 20 73 65 73 73 69 6f | 6e 73 20 74 6f 20 62 72 |g sessio|ns to br|
|00005b10| 6f 61 64 63 61 73 74 20 | 61 64 64 72 65 73 73 2c |oadcast |address,|
|00005b20| 20 63 61 6e 0d 09 09 09 | 09 09 69 6e 64 75 63 65 | can....|..induce|
|00005b30| 20 43 6f 72 6e 65 6c 6c | 20 41 54 2d 47 57 20 74 | Cornell| AT-GW t|
|00005b40| 6f 20 70 72 6f 64 75 63 | 65 20 74 65 6c 6e 65 74 |o produc|e telnet|
|00005b50| 20 73 74 6f 72 6d 73 2e | 2e 2e 20 2a 2f 0d 09 09 | storms.|.. */...|
|00005b60| 09 65 72 72 6f 72 28 22 | 43 61 6e 27 74 20 6f 70 |.error("|Can't op|
|00005b70| 65 6e 20 54 65 6c 6e 65 | 74 20 73 65 73 73 69 6f |en Telne|t sessio|
|00005b80| 6e 20 74 6f 20 74 68 65 | 20 62 72 6f 61 64 63 61 |n to the| broadca|
|00005b90| 73 74 20 61 64 64 72 65 | 73 73 3b 20 70 6c 65 61 |st addre|ss; plea|
|00005ba0| 73 65 20 72 65 63 6f 6e | 66 69 67 75 72 65 20 74 |se recon|figure t|
|00005bb0| 68 65 20 73 65 73 73 69 | 6f 6e 20 61 64 64 72 65 |he sessi|on addre|
|00005bc0| 73 73 22 29 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |ss");...|}...else|
|00005bd0| 20 7b 0d 09 09 09 70 72 | 32 35 28 30 2c 20 68 6f | {....pr|25(0, ho|
|00005be0| 73 74 77 61 69 74 29 3b | 0d 09 09 09 6d 61 63 74 |stwait);|....mact|
|00005bf0| 63 70 5f 6f 70 65 6e 28 | 26 74 77 70 2d 3e 66 68 |cp_open(|&twp->fh|
|00005c00| 6f 73 74 2e 75 2e 61 64 | 64 72 2c 20 74 77 70 2d |ost.u.ad|dr, twp-|
|00005c10| 3e 66 68 6f 73 74 2e 70 | 6f 72 74 2c 20 73 6f 63 |>fhost.p|ort, soc|
|00005c20| 6b 29 3b 0d 09 09 7d 0d | 09 7d 0d 23 69 66 64 65 |k);...}.|.}.#ifde|
|00005c30| 66 20 44 55 41 4c 54 43 | 50 0d 09 65 6c 73 65 20 |f DUALTC|P..else |
|00005c40| 69 66 20 28 74 77 70 2d | 3e 63 6f 6e 6e 74 79 70 |if (twp-|>conntyp|
|00005c50| 65 20 3d 3d 20 43 4f 4e | 4e 5f 43 55 54 43 50 29 |e == CON|N_CUTCP)|
|00005c60| 20 7b 0d 09 09 65 78 74 | 65 72 6e 20 69 6e 74 20 | {...ext|ern int |
|00005c70| 74 63 5f 70 75 74 28 29 | 3b 0d 09 09 65 78 74 65 |tc_put()|;...exte|
|00005c80| 72 6e 20 69 6e 74 20 74 | 63 70 5f 65 78 28 29 3b |rn int t|cp_ex();|
|00005c90| 0d 0d 09 09 69 66 20 28 | 74 63 70 65 6d 64 70 20 |....if (|tcpemdp |
|00005ca0| 3d 3d 20 4e 55 4c 4c 29 | 20 7b 0d 09 09 09 2f 2a |== NULL)| {..../*|
|00005cb0| 20 61 64 64 20 67 61 74 | 65 77 61 79 20 61 64 64 | add gat|eway add|
|00005cc0| 72 65 73 73 20 73 6c 6f | 74 20 2a 2f 0d 09 09 09 |ress slo|t */....|
|00005cd0| 74 63 70 6d 65 6e 75 28 | 29 3b 0d 09 09 7d 0d 09 |tcpmenu(|);...}..|
|00005ce0| 09 65 6c 73 65 20 7b 0d | 09 09 09 69 66 20 28 74 |.else {.|...if (t|
|00005cf0| 63 70 65 6d 64 70 2d 3e | 63 6f 6e 6e 6f 70 65 6e |cpemdp->|connopen|
|00005d00| 29 20 7b 0d 09 09 09 09 | 65 72 72 6f 72 28 22 4f |) {.....|error("O|
|00005d10| 6e 6c 79 20 6f 6e 65 20 | 43 6f 72 6e 65 6c 6c 20 |nly one |Cornell |
|00005d20| 54 43 50 20 73 65 73 73 | 69 6f 6e 20 63 61 6e 20 |TCP sess|ion can |
|00005d30| 62 65 20 75 73 65 64 20 | 61 74 20 61 20 74 69 6d |be used |at a tim|
|00005d40| 65 22 29 3b 0d 09 09 09 | 09 72 65 74 75 72 6e 28 |e");....|.return(|
|00005d50| 2d 31 29 3b 0d 09 09 09 | 7d 0d 09 09 7d 0d 0d 09 |-1);....|}...}...|
|00005d60| 09 70 72 32 35 28 30 2c | 20 68 6f 73 74 77 61 69 |.pr25(0,| hostwai|
|00005d70| 74 29 3b 0d 09 09 74 77 | 70 2d 3e 70 75 74 63 68 |t);...tw|p->putch|
|00005d80| 61 72 20 3d 20 74 63 5f | 70 75 74 3b 0d 09 09 74 |ar = tc_|put;...t|
|00005d90| 77 70 2d 3e 70 75 74 66 | 6c 75 73 68 20 3d 20 74 |wp->putf|lush = t|
|00005da0| 63 70 5f 65 78 3b 0d 09 | 09 0d 09 09 74 63 70 65 |cp_ex;..|....tcpe|
|00005db0| 6d 64 70 20 3d 20 74 77 | 70 3b 0d 09 09 69 66 20 |mdp = tw|p;...if |
|00005dc0| 28 21 63 75 74 63 70 6f | 70 65 6e 29 20 7b 0d 09 |(!cutcpo|pen) {..|
|00005dd0| 09 09 69 66 20 28 6f 70 | 65 6e 73 65 74 74 69 6e |..if (op|ensettin|
|00005de0| 67 73 28 29 29 0d 09 09 | 09 09 65 72 72 6f 72 28 |gs())...|..error(|
|00005df0| 22 43 61 6e 27 74 20 6f | 70 65 6e 20 27 43 6f 6d |"Can't o|pen 'Com|
|00005e00| 65 74 20 44 65 66 61 75 | 6c 74 27 20 64 6f 63 75 |et Defau|lt' docu|
|00005e10| 6d 65 6e 74 22 29 3b 0d | 09 09 09 09 0d 09 09 09 |ment");.|........|
|00005e20| 0d 09 09 09 74 63 70 5f | 69 6e 69 74 28 30 2c 20 |....tcp_|init(0, |
|00005e30| 74 63 70 6f 70 6e 5f 75 | 73 72 2c 20 74 63 70 77 |tcpopn_u|sr, tcpw|
|00005e40| 72 5f 75 73 72 2c 20 74 | 63 70 6d 73 74 5f 72 75 |r_usr, t|cpmst_ru|
|00005e50| 6e 2c 20 0d 09 09 09 09 | 09 74 63 70 63 6c 73 5f |n, .....|.tcpcls_|
|00005e60| 75 73 72 2c 20 74 63 70 | 74 6d 6f 5f 75 73 72 2c |usr, tcp|tmo_usr,|
|00005e70| 20 74 63 70 70 72 5f 64 | 6f 74 2c 20 74 63 70 62 | tcppr_d|ot, tcpb|
|00005e80| 66 72 29 3b 0d 09 09 0d | 09 09 09 63 75 74 63 70 |fr);....|...cutcp|
|00005e90| 6f 70 65 6e 20 3d 20 54 | 52 55 45 3b 0d 09 09 09 |open = T|RUE;....|
|00005ea0| 69 66 20 28 21 20 28 2a | 72 6e 65 74 2d 3e 6e 5f |if (! (*|rnet->n_|
|00005eb0| 73 75 62 6e 65 74 29 28 | 29 29 20 7b 0d 09 09 09 |subnet)(|)) {....|
|00005ec0| 09 69 66 20 28 67 65 74 | 5f 73 75 62 6e 65 74 28 |.if (get|_subnet(|
|00005ed0| 29 29 20 7b 0d 09 09 09 | 09 09 2f 2a 20 69 67 6e |)) {....|../* ign|
|00005ee0| 6f 72 65 20 6c 61 63 6b | 20 6f 66 20 67 61 74 65 |ore lack| of gate|
|00005ef0| 77 61 79 2c 20 61 73 73 | 75 6d 65 20 6c 6f 63 61 |way, ass|ume loca|
|00005f00| 6c 20 6e 65 74 20 2a 2f | 0d 09 09 09 09 09 3b 0d |l net */|......;.|
|00005f10| 09 09 09 09 7d 0d 09 09 | 09 09 65 6c 73 65 20 7b |....}...|..else {|
|00005f20| 0d 09 09 09 09 09 63 6c | 6f 73 65 73 65 74 74 69 |......cl|osesetti|
|00005f30| 6e 67 73 28 29 3b 0d 09 | 09 09 09 09 72 65 74 75 |ngs();..|....retu|
|00005f40| 72 6e 28 2d 31 29 3b 0d | 09 09 09 09 7d 0d 09 09 |rn(-1);.|....}...|
|00005f50| 09 7d 0d 09 09 09 63 6c | 6f 73 65 73 65 74 74 69 |.}....cl|osesetti|
|00005f60| 6e 67 73 28 29 3b 0d 09 | 09 7d 0d 09 09 73 6f 63 |ngs();..|.}...soc|
|00005f70| 6b 20 3d 20 74 6e 5f 73 | 6f 63 6b 28 29 3b 0d 09 |k = tn_s|ock();..|
|00005f80| 09 74 63 70 5f 6f 70 65 | 6e 28 26 74 77 70 2d 3e |.tcp_ope|n(&twp->|
|00005f90| 66 68 6f 73 74 2e 75 2e | 61 64 64 72 2c 20 74 77 |fhost.u.|addr, tw|
|00005fa0| 70 2d 3e 66 68 6f 73 74 | 2e 70 6f 72 74 2c 20 73 |p->fhost|.port, s|
|00005fb0| 6f 63 6b 29 3b 0d 09 7d | 0d 23 65 6e 64 69 66 0d |ock);..}|.#endif.|
|00005fc0| 09 65 6c 73 65 20 69 66 | 20 28 74 77 70 2d 3e 63 |.else if| (twp->c|
|00005fd0| 6f 6e 6e 74 79 70 65 20 | 3d 3d 20 43 4f 4e 4e 5f |onntype |== CONN_|
|00005fe0| 53 45 52 44 29 20 7b 0d | 09 09 65 78 74 65 72 6e |SERD) {.|..extern|
|00005ff0| 20 69 6e 74 20 73 65 72 | 70 75 74 63 68 61 72 28 | int ser|putchar(|
|00006000| 29 3b 0d 09 09 65 78 74 | 65 72 6e 20 69 6e 74 20 |);...ext|ern int |
|00006010| 73 65 72 70 75 74 66 6c | 75 73 68 28 29 3b 0d 09 |serputfl|ush();..|
|00006020| 09 0d 09 09 74 77 70 2d | 3e 70 75 74 63 68 61 72 |....twp-|>putchar|
|00006030| 20 3d 20 73 65 72 70 75 | 74 63 68 61 72 3b 0d 09 | = serpu|tchar;..|
|00006040| 09 74 77 70 2d 3e 70 75 | 74 66 6c 75 73 68 20 3d |.twp->pu|tflush =|
|00006050| 20 73 65 72 70 75 74 66 | 6c 75 73 68 3b 0d 09 09 | serputf|lush;...|
|00006060| 0d 09 09 74 65 72 6d 72 | 65 73 65 74 28 29 3b 09 |...termr|eset();.|
|00006070| 2f 2a 20 63 6c 65 61 72 | 20 74 68 65 20 6f 6c 64 |/* clear| the old|
|00006080| 20 73 63 72 65 65 6e 20 | 2a 2f 0d 09 09 67 65 74 | screen |*/...get|
|00006090| 74 65 72 6d 74 79 70 65 | 28 29 3b 0d 09 09 73 65 |termtype|();...se|
|000060a0| 74 63 6f 6e 74 65 78 74 | 28 65 6d 64 70 29 3b 0d |tcontext|(emdp);.|
|000060b0| 09 09 0d 09 09 73 65 74 | 69 62 6d 5f 6b 65 79 6d |.....set|ibm_keym|
|000060c0| 6f 64 65 28 74 77 70 2d | 3e 69 62 6d 5f 6b 65 79 |ode(twp-|>ibm_key|
|000060d0| 6d 6f 64 65 29 3b 0d 09 | 09 09 2f 2a 20 67 65 74 |mode);..|../* get|
|000060e0| 20 63 6f 6e 74 72 6f 6c | 73 20 6e 6f 77 2c 20 77 | control|s now, w|
|000060f0| 68 65 72 65 61 73 20 54 | 65 6c 6e 65 74 20 6d 75 |hereas T|elnet mu|
|00006100| 73 74 20 77 61 69 74 20 | 75 6e 74 69 6c 20 6e 65 |st wait |until ne|
|00006110| 67 6f 74 69 61 74 69 6f | 6e 73 20 63 65 61 73 65 |gotiatio|ns cease|
|00006120| 20 2a 2f 0d 09 09 09 0d | 09 09 69 66 20 28 6f 70 | */.....|..if (op|
|00006130| 65 6e 73 65 72 70 6f 72 | 74 28 29 29 20 7b 0d 09 |enserpor|t()) {..|
|00006140| 09 09 70 72 32 35 28 30 | 2c 20 6e 6f 73 65 73 73 |..pr25(0|, nosess|
|00006150| 69 6f 6e 73 74 72 29 3b | 0d 09 09 09 72 65 74 75 |ionstr);|....retu|
|00006160| 72 6e 28 2d 31 29 3b 0d | 09 09 7d 0d 09 09 6f 70 |rn(-1);.|..}...op|
|00006170| 6e 5f 75 73 72 28 29 3b | 0d 09 09 65 6d 64 70 2d |n_usr();|...emdp-|
|00006180| 3e 74 6e 64 61 74 61 20 | 3d 20 54 52 55 45 3b 09 |>tndata |= TRUE;.|
|00006190| 09 09 2f 2a 20 67 75 61 | 72 61 6e 74 65 65 20 63 |../* gua|rantee c|
|000061a0| 6f 6e 74 72 6f 6c 73 20 | 63 6f 6d 65 20 75 70 20 |ontrols |come up |
|000061b0| 2a 2f 0d 09 09 68 6f 73 | 74 63 6f 6e 6e 63 6f 6d |*/...hos|tconncom|
|000061c0| 70 6c 65 74 65 28 65 6d | 64 70 2d 3e 63 6f 6e 6e |plete(em|dp->conn|
|000061d0| 6d 61 63 72 6f 29 3b 0d | 09 7d 0d 09 72 65 74 75 |macro);.|.}..retu|
|000061e0| 72 6e 28 30 29 3b 0d 7d | 0d 0d 0d 0d 23 64 65 66 |rn(0);.}|....#def|
|000061f0| 69 6e 65 20 44 4c 41 43 | 43 45 50 54 20 09 32 30 |ine DLAC|CEPT .20|
|00006200| 30 30 0d 23 64 65 66 69 | 6e 65 20 44 4c 41 43 59 |00.#defi|ne DLACY|
|00006210| 45 53 09 09 31 0d 23 64 | 65 66 69 6e 65 20 44 4c |ES..1.#d|efine DL|
|00006220| 41 43 4e 4f 09 09 32 0d | 0d 69 6e 74 20 74 66 74 |ACNO..2.|.int tft|
|00006230| 70 5f 64 69 72 65 63 74 | 69 6f 6e 3b 0d 0d 74 6e |p_direct|ion;..tn|
|00006240| 74 66 74 70 28 68 6f 73 | 74 2c 20 66 69 6c 65 2c |tftp(hos|t, file,|
|00006250| 20 64 69 72 29 0d 09 69 | 6e 5f 6e 61 6d 65 20 68 | dir)..i|n_name h|
|00006260| 6f 73 74 3b 0d 09 63 68 | 61 72 20 2a 66 69 6c 65 |ost;..ch|ar *file|
|00006270| 3b 0d 09 75 6e 73 69 67 | 6e 65 64 20 64 69 72 3b |;..unsig|ned dir;|
|00006280| 20 0d 7b 0d 09 63 68 61 | 72 20 62 75 66 66 65 72 | .{..cha|r buffer|
|00006290| 5b 31 30 30 5d 3b 0d 09 | 63 68 61 72 20 63 3b 0d |[100];..|char c;.|
|000062a0| 09 73 68 6f 72 74 20 69 | 74 65 6d 3b 0d 09 44 69 |.short i|tem;..Di|
|000062b0| 61 6c 6f 67 50 74 72 20 | 64 70 74 72 3b 0d 09 47 |alogPtr |dptr;..G|
|000062c0| 72 61 66 50 74 72 20 6f | 6c 64 70 6f 72 74 3b 0d |rafPtr o|ldport;.|
|000062d0| 0d 09 74 66 74 70 5f 64 | 69 72 65 63 74 69 6f 6e |..tftp_d|irection|
|000062e0| 20 3d 20 64 69 72 3b 0d | 09 69 66 20 28 74 66 74 | = dir;.|.if (tft|
|000062f0| 70 61 73 6b 20 3d 3d 20 | 54 46 4e 4f 29 20 7b 0d |pask == |TFNO) {.|
|00006300| 09 09 6d 61 63 5f 73 65 | 74 64 6f 77 6e 76 6f 6c |..mac_se|tdownvol|
|00006310| 28 29 3b 0d 09 09 69 66 | 20 28 64 69 72 20 3d 3d |();...if| (dir ==|
|00006320| 20 50 55 54 29 20 7b 0d | 09 09 09 2f 2a 20 73 61 | PUT) {.|.../* sa|
|00006330| 76 65 20 74 68 65 20 74 | 65 78 74 20 77 69 6e 64 |ve the t|ext wind|
|00006340| 6f 77 20 69 66 20 6e 65 | 63 65 73 73 61 72 79 20 |ow if ne|cessary |
|00006350| 2a 2f 0d 09 09 09 74 65 | 78 74 75 70 65 64 69 74 |*/....te|xtupedit|
|00006360| 28 66 69 6c 65 29 3b 0d | 09 09 7d 0d 09 09 72 65 |(file);.|..}...re|
|00006370| 74 75 72 6e 28 54 52 55 | 45 29 3b 0d 09 7d 0d 09 |turn(TRU|E);..}..|
|00006380| 65 6c 73 65 20 69 66 20 | 28 74 66 74 70 61 73 6b |else if |(tftpask|
|00006390| 20 3d 3d 20 54 46 59 45 | 53 29 20 7b 0d 23 69 66 | == TFYE|S) {.#if|
|000063a0| 64 65 66 20 42 41 43 4b | 54 46 54 50 52 45 4a 45 |def BACK|TFTPREJE|
|000063b0| 43 54 0d 09 09 69 66 20 | 28 63 68 6b 62 61 63 6b |CT...if |(chkback|
|000063c0| 67 72 6f 75 6e 64 28 29 | 29 0d 09 09 09 2f 2a 20 |ground()|)..../* |
|000063d0| 69 66 20 61 73 6b 69 6e | 67 20 6f 6e 20 26 20 77 |if askin|g on & w|
|000063e0| 65 27 72 65 20 69 6e 20 | 74 68 65 20 62 61 63 6b |e're in |the back|
|000063f0| 67 72 6f 75 6e 64 2c 20 | 72 65 6a 65 63 74 20 74 |ground, |reject t|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.